NAV
JSON cURL

Cirro API Documentation

Authentication

Generate a RSA key pair

Generate a RSA key pair for your app at your app's settings page. Once generated the private key in "PEM" format will be downloaded automatically. Please store the key file securely on your app's server. Each key pair comes with a unique fingerprint. You can verify your key's fingerprint with:

openssl rsa -in PATH_TO_PEM_FILE -pubout -outform DER | openssl sha1 -c

Create your access token

To authenticate to cirro API you need the following:

Use your private key to sign a JSON Web Token (JWT) which contains your app's id as the issuer in the payload.

# Example in ruby

require 'openssl'
require 'jwt'
# Private key contents
private_pem = File.read(PATH_TO_YOUR_PEM_FILE)
private_key = OpenSSL::PKey::RSA.new(private_pem)

payload = {
  # JWT expiration time (10 minute maximum)
  exp: Time.now.to_i + (10 * 60),
  # App client id
  iss: YOUR_APP_ID
}

jwt_token = JWT.encode(payload, private_key, 'RS256')

After creating your JWT token use it in your request's authorization header.

$ curl -i -H "Authorization: Bearer YOUR_JWT" https://api.cirro.io/v1/app

AppUsers

Create an app user

Request

Endpoint

POST https://api.cirro.io/v1/app-users
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwMTZ9.ejZXHst1XFRi0RdP0JPQonWHv4Gdsthlp9uS5xSgy_8rKMchHQsdAHux4VhCiKrJW6XzCIGOB-rF7FtjJJT-FMBPY_wB1GkQ5LC65GIFeK90SYM8U_XaZCh9s0mSSFTgpbtJrJQt7NUwJLpiLLyYzwXLJskXO1GtQmo7aK_3K1trRylOOs1YIeRL1oDeqjY26YCt4u5lk7axgripoMxvdUktVR1c7sVjstt_t0r_5khFumboWDJIjfb6Kna332xC3-6SeAM-qg1BG3VHtfKQcbmxR9NnKxsmbCzX6PuCSDY6WzsxWaQdFvnvXSKcL8MYgt65u4TLdrCpsqV8EMgqUA

POST https://api.cirro.io/v1/app-users

Parameters

{"data":{"type":"app-users","attributes":{"email":"[email protected]","first-name":"Kia","last-name":"Heathcote","screen-name":"17bertram","password":"hq1kkh4j","time-zone":"Asia/Kuala_Lumpur"}}}
Name Description
type required MUST be app-users
attributes[email] required E-mail
attributes[first_name] required First name
attributes[last_name] required Last name
attributes[screen_name] Screen name
attributes[password] Password for Cirro
attributes[time_zone] Time zone
attributes[auto_confirm] Auto confirm?

Response

Content-Type: application/vnd.api+json
201 Created
{
  "data": {
    "id": "17",
    "type": "app-users",
    "links": {
      "self": "https://api.cirro.io/api/v1/app-users/17"
    },
    "attributes": {
      "email": "[email protected]",
      "first-name": "Kia",
      "last-name": "Heathcote",
      "time-zone": "Asia/Kuala_Lumpur",
      "screen-name": "17bertram",
      "screenname": "17bertram",
      "epam-idx": null,
      "country-code": null,
      "auto-confirm": null,
      "epam-user-info": null
    },
    "relationships": {
      "connected-accounts": {
        "links": {
          "self": "https://api.cirro.io/api/v1/app-users/17/relationships/connected-accounts",
          "related": "https://api.cirro.io/api/v1/app-users/17/connected-accounts"
        }
      }
    }
  }
}

Get an app user

Request

Endpoint

GET https://api.cirro.io/v1/app-users/13.json
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwMTV9.hirXQSTs0iU0Z-dTA7eYtUkxnS4eF9yaIJhEzBfKFOvibKjrZVks5pEEoRcHvy8xNEPBOy-AUitL98NLs_Q7avC5pbs-Ns583zampiMmqkDjCJiqF0n5Qg3keCQi40ftIW-ZLFobw7pLpOJ9c8a7ZsFK4kmmqIJelC_w-ktR8TknE3SPQK9eOkafAJm0jtegkmb2lA-j7t7wJB-kdUJ3fmjvmhftsrNx0d9U-zVJI4dqNkShMYI3hKECCQfHUGK3fgo8p7bSb9-ITPK3jK8-wp3Nr_mV0B-5xooD_SurY8iZY8JiQVVR3yJz-U39Nyxc2GCq-qh9C9KS0aNhJCP4TA

GET https://api.cirro.io/v1/app-users/:id.json

Parameters

Name Description
id required ID of the app user

Response

Content-Type: application/vnd.api+json
200 OK
{
  "data": {
    "id": "13",
    "type": "app-users",
    "links": {
      "self": "https://api.cirro.io/api/v1/app-users/13"
    },
    "attributes": {
      "email": "[email protected]",
      "first-name": "Syreeta",
      "last-name": "Douglas",
      "time-zone": "Europe/Dublin",
      "screen-name": "13rubin",
      "screenname": "13rubin",
      "epam-idx": null,
      "country-code": "GQ",
      "auto-confirm": null,
      "epam-user-info": null
    },
    "relationships": {
      "connected-accounts": {
        "links": {
          "self": "https://api.cirro.io/api/v1/app-users/13/relationships/connected-accounts",
          "related": "https://api.cirro.io/api/v1/app-users/13/connected-accounts"
        }
      }
    }
  }
}

Get an app user

Request

Endpoint

GET https://api.cirro.io/v1/app-users/15
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwMTZ9.B4-zf12DfbJ1daG54zVOGlpCTaev9t36fmkDQgOL1865VYJK_KvNKjAnssH43F-p5iCkfsFUVzzIcy9Csye-d7P1WIjFQzYRN7wqrAodstFhz7tW8DNCBUkjUUVVWPMBd7y7tck7K8cEXexguW72Hwdz7f02pf3pVYqNZVum9pqoyVWERBNF1EVj51IIByys_E8k7ztNTwnm2zdIH_jVCTXQubS7YB77em9HAYybLxQLUCxbyylw_ZU4-CNEDwI9B7mKIN0yzmTzgUSXyuhCf6XNHS2aQGPkhuNtYhqc478BADuIjuSGspU-m-0TdfsRYBPCi_yMa-Id0Uv0jEr9aQ

GET https://api.cirro.io/v1/app-users/:id

Parameters

Name Description
id required ID of the app user

Response

Content-Type: application/vnd.api+json
200 OK
{
  "data": {
    "id": "15",
    "type": "app-users",
    "links": {
      "self": "https://api.cirro.io/api/v1/app-users/15"
    },
    "attributes": {
      "email": "[email protected]",
      "first-name": "Darby",
      "last-name": "Koepp",
      "time-zone": "Europe/Zagreb",
      "screen-name": "15nina.huel",
      "screenname": "15nina.huel",
      "epam-idx": null,
      "country-code": "MG",
      "auto-confirm": null,
      "epam-user-info": null
    },
    "relationships": {
      "connected-accounts": {
        "links": {
          "self": "https://api.cirro.io/api/v1/app-users/15/relationships/connected-accounts",
          "related": "https://api.cirro.io/api/v1/app-users/15/connected-accounts"
        }
      }
    }
  }
}

Get current app user

Request

Endpoint

GET https://api.cirro.io/v1/app-users/me?include=app-worker%2Capp-worker.gig-invitations%2Cconnected-accounts
Content-Type: application/vnd.api+json
Authorization: Bearer TEKTQ8OomB38EBlvh3Pb35E_f-epq3xZeHJvjo1ByGg

GET https://api.cirro.io/v1/app-users/me

Parameters

include: app-worker,app-worker.gig-invitations,connected-accounts

None known.

Response

Content-Type: application/vnd.api+json
200 OK
{
  "data": {
    "id": "2",
    "type": "app-users",
    "links": {
      "self": "https://api.cirro.io/api/v1/app-users/2"
    },
    "attributes": {
      "email": "[email protected]",
      "first-name": "Yvonne",
      "last-name": "Price",
      "time-zone": "America/Bogota",
      "screen-name": "2opal",
      "screenname": "2opal",
      "epam-idx": null,
      "country-code": "WF",
      "auto-confirm": null,
      "epam-user-info": null
    },
    "relationships": {
      "app-worker": {
        "data": {
          "type": "app-workers",
          "id": "1"
        }
      },
      "connected-accounts": {
        "links": {
          "self": "https://api.cirro.io/api/v1/app-users/2/relationships/connected-accounts",
          "related": "https://api.cirro.io/api/v1/app-users/2/connected-accounts"
        },
        "data": [
          {
            "type": "connected-accounts",
            "id": "1"
          }
        ]
      }
    }
  },
  "included": [
    {
      "id": "1",
      "type": "app-workers",
      "links": {
        "self": "https://api.cirro.io/api/v1/app-workers/1"
      },
      "attributes": {
        "worker-document": {
          "app_worker_id": 1,
          "eos": [
            "consequuntur"
          ],
          "et": 96
        },
        "billable": true
      },
      "relationships": {
        "gig-invitations": {
          "data": [
            {
              "type": "gig-invitations",
              "id": "1"
            },
            {
              "type": "gig-invitations",
              "id": "2"
            }
          ]
        }
      }
    },
    {
      "id": "1",
      "type": "gig-invitations",
      "links": {
        "self": "https://api.cirro.io/api/v1/gig-invitations/1"
      },
      "attributes": {
        "status": "pending",
        "gig-id": 1,
        "app-worker-id": 1
      },
      "relationships": {
        "app-worker": {
          "data": {
            "type": "app-workers",
            "id": "1"
          }
        }
      }
    },
    {
      "id": "2",
      "type": "gig-invitations",
      "links": {
        "self": "https://api.cirro.io/api/v1/gig-invitations/2"
      },
      "attributes": {
        "status": "pending",
        "gig-id": 2,
        "app-worker-id": 1
      },
      "relationships": {
        "app-worker": {
          "data": {
            "type": "app-workers",
            "id": "1"
          }
        }
      }
    },
    {
      "id": "1",
      "type": "connected-accounts",
      "attributes": {
        "provider": "linkedin"
      }
    }
  ]
}

Update an app user

Request

Endpoint

PATCH https://api.cirro.io/v1/app-users/24
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwMTh9.I3sfGQWmJDIeHci16rpVPxOuOHWFN730IMxYe1QAO05bnnz3F_EBBuBu4TVE8A1AkSMu5x9alPim2tr_jN9ROSvBNeVCjZrnM8w2Fu4V9mPNMrYkALNwqKKC5bShzI9PQnqJ7z5jydvQ75F8Kb1C76eiDDfmuphHD9DPpb04fbj4apX0WsS3YtsaUtvDFx0J9rt7A3N80p1Oz2UPVbhRlHOMK8hqQ-CT1oW2ybS1FNMeUwPrxR1ujm5RPy7Tb0rqyQtLQ69Jnrj9H3d5LPxD7J-gDhwZaS4pmhcmB3mlCOOuD0PTzQu9gW0zYexid7kL30Jx2GZcaY80KqwbhA9MHQ

PATCH https://api.cirro.io/v1/app-users/:id

Parameters

{"data":{"type":"app-users","attributes":{"password":"itti0m36"},"id":24}}
Name Description
id required ID of the app user
type required MUST be app-users
attributes[password] required A new password for Cirro

Response

Content-Type: application/vnd.api+json
200 OK
{
  "data": {
    "id": "24",
    "type": "app-users",
    "links": {
      "self": "https://api.cirro.io/api/v1/app-users/24"
    },
    "attributes": {
      "email": "[email protected]",
      "first-name": "Jamal",
      "last-name": "Bruen",
      "time-zone": "Asia/Kuwait",
      "screen-name": "26tristan",
      "screenname": "26tristan",
      "epam-idx": null,
      "country-code": "MX",
      "auto-confirm": null,
      "epam-user-info": null
    },
    "relationships": {
      "connected-accounts": {
        "links": {
          "self": "https://api.cirro.io/api/v1/app-users/24/relationships/connected-accounts",
          "related": "https://api.cirro.io/api/v1/app-users/24/connected-accounts"
        }
      }
    }
  }
}

Update an app user

Request

Endpoint

PUT https://api.cirro.io/v1/app-users/34
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwMTl9.irGJFDzp_7oqT-cZ1vDZecZCTsHJUezn12EvUfu08Of3QxKkd5-K7VjrkMuBQq7ZXW57L5J-4ukA48A95qUcNqlJ2S7r28MJuSmM2uxSO1H6fuItrubisY-nppDhXmh74A0_d-TYVpho-G9HLUxTmp9tYc8STbrdJilasVmCpu_SoeAMI_-9TVG6E0l6hcq1gtw9O7MV6-5CFKUd5--vgzfr3UcZt7nmc0aLtW_oBQasG5vdzffyF4dn2dsjnsRf1kHpM6LlshBiwkCPmKT8inYwMN8rBWX9BFziX5oTlIEqCFuDIM-OgKe2ZsPdRjoTfGbiL22oOFd-6iAtqChsrg

PUT https://api.cirro.io/v1/app-users/:id

Parameters

{"data":{"type":"app-users","attributes":{"password":"4l44o7i9"},"id":34}}
Name Description
id required ID of the app user
type required MUST be app-users
attributes[password] required A new password for Cirro

Response

Content-Type: application/vnd.api+json
200 OK
{
  "data": {
    "id": "34",
    "type": "app-users",
    "links": {
      "self": "https://api.cirro.io/api/v1/app-users/34"
    },
    "attributes": {
      "email": "[email protected]",
      "first-name": "German",
      "last-name": "Bednar",
      "time-zone": "Asia/Tashkent",
      "screen-name": "46zana",
      "screenname": "46zana",
      "epam-idx": null,
      "country-code": "UA",
      "auto-confirm": null,
      "epam-user-info": null
    },
    "relationships": {
      "connected-accounts": {
        "links": {
          "self": "https://api.cirro.io/api/v1/app-users/34/relationships/connected-accounts",
          "related": "https://api.cirro.io/api/v1/app-users/34/connected-accounts"
        }
      }
    }
  }
}

AppWorkers

Create an app worker

Request

Endpoint

POST https://api.cirro.io/v1/app-workers
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwMjJ9.P97vLpgQiqzCAzvThIr8rEoMe8a0UhF3dIMshdwkASJwj3Ryl7dCS7U9rCTnWYjovkFsnpaLpvrCDF9aectKSyX72wrQpFs_yH5eta-WF2uRrml3FIc5Z4_EVUT8LBqYbznwFPwHLPXgQhE2DimpMcn1LheBRBCAmaf-Tcn28JQCj2vdVNG2Wj-gaq654ttavK6DXS9feYe3oTJkTVlNyMzmZ6Q_n_xIy_531KwNjmN_7Sy5HWToTmwnx-aaMiJulP-pI5JQtRsM263HAqNg_f1glt9EbHEIdjAJyM-X1vg9jKxXBaHiTedw2RZ3i1bDg9ObxwPT3QVTPWVaHhiKvA

POST https://api.cirro.io/v1/app-workers

Parameters

{"data":{"type":"app-workers","attributes":{"worker-document":{}},"relationships":{"app-user":{"data":{"type":"app-users","id":"46"}}}}}
Name Description
type required MUST be app-workers
attributes[worker_document] required Worker's attributes
relationships[app_user] required Associated user

Response

Content-Type: application/vnd.api+json
201 Created
{
  "data": {
    "id": "9",
    "type": "app-workers",
    "links": {
      "self": "https://api.cirro.io/api/v1/app-workers/9"
    },
    "attributes": {
      "worker-document": {
        "app_worker_id": 9
      },
      "billable": true
    }
  }
}

Get an app worker

Request

Endpoint

GET https://api.cirro.io/v1/app-workers/15
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwMjN9.cC4iybUZRmN1QTR2mP1WTnGsvVY2Tg48f6xTEI19N4jvclzR9DhLHILA1S7fTyAEOxPkom-kjo1iivw9K7o5Y-3GdStbD_Ue_ceRX29BdoBceVvhs5V6NVZoqyaZwU9ghZ7xH2x5aB2RK-LpoLjACD8qUnIoY180EyEUZS_phjorOVjocrS1bbno614bKl-bcI3cGwZq-tmbLVqT0Ix32qRfhiu098F9ChYjtesaTu3TUjGfeDq3Fmrxoc37ZJ7q9VsDDHL1nm6OcrVXoyLuBXuZAUE8A2a9DAI7Joc9UnZ96ReG-9M1k-sCwxZ7z9-0CLakZWu5dqlxM6ce_r6gEA

GET https://api.cirro.io/v1/app-workers/:id

Parameters

Name Description
id required ID of the app worker

Response

Content-Type: application/vnd.api+json
200 OK
{
  "data": {
    "id": "15",
    "type": "app-workers",
    "links": {
      "self": "https://api.cirro.io/api/v1/app-workers/15"
    },
    "attributes": {
      "worker-document": {
        "app_worker_id": 15,
        "nesciunt": "a",
        "praesentium": "harum",
        "dolorum": [
          96
        ],
        "impedit": "sit",
        "eos": "eius",
        "voluptatibus": 18,
        "quas": {
          "est": "sit"
        }
      },
      "billable": true
    }
  }
}

Get current worker

Request

Endpoint

GET https://api.cirro.io/v1/app-workers/me?include=gig-invitations
Content-Type: application/vnd.api+json
Authorization: Bearer kXp5ljDPaWc4391VyjDbjiL_MXV8oZevvs74E5v6d1k

GET https://api.cirro.io/v1/app-workers/me

Parameters

include: gig-invitations

None known.

Response

Content-Type: application/vnd.api+json
200 OK
{
  "data": {
    "id": "7",
    "type": "app-workers",
    "links": {
      "self": "https://api.cirro.io/api/v1/app-workers/7"
    },
    "attributes": {
      "worker-document": {
        "app_worker_id": 7
      },
      "billable": true
    },
    "relationships": {
      "gig-invitations": {
        "data": [
          {
            "type": "gig-invitations",
            "id": "13"
          },
          {
            "type": "gig-invitations",
            "id": "14"
          }
        ]
      }
    }
  },
  "included": [
    {
      "id": "13",
      "type": "gig-invitations",
      "links": {
        "self": "https://api.cirro.io/api/v1/gig-invitations/13"
      },
      "attributes": {
        "status": "pending",
        "gig-id": 13,
        "app-worker-id": 7
      },
      "relationships": {
        "app-worker": {
          "data": {
            "type": "app-workers",
            "id": "7"
          }
        }
      }
    },
    {
      "id": "14",
      "type": "gig-invitations",
      "links": {
        "self": "https://api.cirro.io/api/v1/gig-invitations/14"
      },
      "attributes": {
        "status": "pending",
        "gig-id": 14,
        "app-worker-id": 7
      },
      "relationships": {
        "app-worker": {
          "data": {
            "type": "app-workers",
            "id": "7"
          }
        }
      }
    }
  ]
}

Update an app worker

Request

Endpoint

PATCH https://api.cirro.io/v1/app-workers/17
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwMjR9.dO0ecE5uDbysch2f8vN0qJOv8UxmH5SXRdRBQclcEHKh7Zl793bq3tYdnGr93cKBFqdvg94kStsBLjzTApGY_6k9_Bno4-F6zNF8niFW03Z0mHEmQhOo1kXMiXUEvKnJ--Wk5Euu8xZh8BCBiw1eBg_A5AGmK6k7OUF8L6OvKPTi4BXMLhCfe7Dz5FRt22kzWfeSQe6OH2zWY8GGKeyH-ycYXa5OhmzmdEu9TrTpxah5GXxVzKPqtk8b55b5JQKY7orSsQtyfIjn1yhrUfFiYoqpU4KIsn1UKOzX6pI-jUPdA6GZdu1bXxl7Mh3ZADb-o03Vox3DTjC4GP0OEmwQZg

PATCH https://api.cirro.io/v1/app-workers/:id

Parameters

{"data":{"type":"app-workers","attributes":{"worker-document":{"quis":"vel","inventore":"enim","fugit":["recusandae"],"porro":{"quibusdam":85},"iure":{"aspernatur":54},"et":75,"officiis":{"distinctio":"deserunt"}}},"id":17}}
Name Description
id required ID of the app worker
type required MUST be app-workers
attributes[worker_document] required Arbitrary JSON

Response

Content-Type: application/vnd.api+json
200 OK
{
  "data": {
    "id": "17",
    "type": "app-workers",
    "links": {
      "self": "https://api.cirro.io/api/v1/app-workers/17"
    },
    "attributes": {
      "worker-document": {
        "app_worker_id": 17,
        "et": 75,
        "fugit": [
          "recusandae"
        ],
        "inventore": "enim",
        "iure": {
          "aspernatur": 54
        },
        "officiis": {
          "distinctio": "deserunt"
        },
        "porro": {
          "quibusdam": 85
        },
        "quis": "vel"
      },
      "billable": true
    }
  }
}

Update an app worker

Request

Endpoint

PUT https://api.cirro.io/v1/app-workers/22
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwMjV9.jcdTiMqpEwebVzC0hG-9qTuVD1rEORgbvf7NuviqiXi0Og6u9If7U2HgvwfHFfgEXhrM0biJQ4PT47xDmgSZdCF6jOcbpmRCqoiDtcENotHxVp7-cCH1FBFzWajuLAx4mcM4TBbisspUyKrQ3bLwnb_c9JMPl3lGJX6bhid5cYfhdB1hjLaXfFvAnL2mrck_Tn-x0GNDPwhzWcLRKuMht72FTTUGRMyqL7FTzPSEkEqvoWYwH19vRXWG4KOWTBDb23AVzK9KuWtb7C7PywLUJZBNtPQSnlFWlGxz21KPJbA0joOt1POifU5-SXo10D9rN0xVOiRpo5kBPB_9eTNqNw

PUT https://api.cirro.io/v1/app-workers/:id

Parameters

{"data":{"type":"app-workers","attributes":{"worker-document":{"sed":{"est":"dolore"}}},"id":22}}
Name Description
id required ID of the app worker
type required MUST be app-workers
attributes[worker_document] required Arbitrary JSON

Response

Content-Type: application/vnd.api+json
200 OK
{
  "data": {
    "id": "22",
    "type": "app-workers",
    "links": {
      "self": "https://api.cirro.io/api/v1/app-workers/22"
    },
    "attributes": {
      "worker-document": {
        "app_worker_id": 22,
        "rerum": [
          "vitae"
        ],
        "tempora": "voluptatem",
        "consequuntur": {
          "laboriosam": 40
        },
        "repellendus": 89,
        "ut": 59,
        "sed": {
          "est": "dolore"
        }
      },
      "billable": true
    }
  }
}

ConnectedAccounts

Get list of connected accounts of a user

Request

Endpoint

GET http://api.cirro.io/v1/app-users/116/connected-accounts
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwMzF9.kdd_yEjofVG7hovWsCSB0fMNjqlQlJhn4Wjt7SuIHWvWaa_XJvRQN3qDW9Lk67ZNgB6fqRXC8PO7D6HUWfePIwdaFGVNhrRSPnpzTlV3ao6gtwzgzE3SF0iizyPrzGr3DgSJ-rjF8Zn82t5yy0DwIXRhm2Z7pS8GTorn_JgEgjGqtxMQBo8TxTGX7wRTd_X2zRoyi7NqJ8hSNVJEoNuAKb7-nMbw4jYc80A7GJnLoHc_JOxcjE9z_UA0io4zuZ9ledgnR6IHd_cZ60p85F8pEFfyNHWo1vQJzvZSW0i0W94_Rhc7dq9_lGdTNgb1paJsF6uQvfNBsUGDldIath7DCw

GET http://api.cirro.io/v1/app-users/:app_user_id/connected-accounts

Parameters

None known.

Response

Content-Type: application/vnd.api+json
200 OK
{
  "data": [
    {
      "id": "7",
      "type": "connected-accounts",
      "attributes": {
        "provider": "linkedin"
      }
    }
  ]
}

GigInvitations

Create a gig invitation

Request

Endpoint

POST https://api.cirro.io/v1/gig-invitations
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwMzZ9.TzZsEnretSsG3oRG33rWKPSGEEMc-JuOFX2UWjSpdvhSAhH-AAXLbs2n1dT9_cxIEE9aeK6HHAThCW9kKHRirgL_F4sern7TZqR36SdSMECee3UEp5fI2a-x3P4H1WH1zYM-SHHt4MIF_U6DW86hImfl-J6XxVPaDqa0sMjycaqz-b-Z3IimUsaJKP_c5pLEjUtSOm_PbQPTcRtdPC0Ch3XlY7KCegHcf-ljFBRgv14CWD1F36rnTzwtxZ6lrnq4nmbgY0Qak-8Owyrd84tSqzyyCp-ODsUwQPDUqmV1U14lEmsdut2t0gY5RGyMiut8quSjvXZtdvl5h7jhmRY0Qg

POST https://api.cirro.io/v1/gig-invitations

Parameters

{"data":{"type":"gig-invitations","attributes":{"status":"accepted"},"relationships":{"gig":{"data":{"type":"gigs","id":"87"}},"app-worker":{"data":{"type":"app-workers","id":"106"}}}}}
Name Description
type required MUST be gig-invitations
attributes[status] Status
relationships[gig] required Gig to invite to
relationships[app_worker] required App worker to invite

Response

Content-Type: application/vnd.api+json
201 Created
{
  "data": {
    "id": "85",
    "type": "gig-invitations",
    "links": {
      "self": "https://api.cirro.io/api/v1/gig-invitations/85"
    },
    "attributes": {
      "status": "accepted",
      "gig-id": 87,
      "app-worker-id": 106
    }
  }
}

Create invitations matching the worker filter

Request

Endpoint

POST https://api.cirro.io/v1/bulk/gigs/17/gig_invitations
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwMjZ9.TRFUg_Z3JZtXGGaWnm0gwdj95kZTDy5Jw8SPHdMUpxBGxH3xdpq190yxHiem04w8lpzxLBIL__583T7kiybVuY9EYdXLvoMOFnjOWKO5BhcDN9at2DgHCGlJdTtMQMW9yFPble0S3voWtJLDr-e0nLeWEZnQShGCHIWyCh-mXoGKUaWUQTZ15XOE3xSiGgsvYrAPTD-RF1TSj8RilJvNOhQgxGb7SlUo7hSnH9dhwcfYf8BD85kVtM_UZxHMBPpkQLcIYGxZAnIWRgVqp0sMF2VsW7p4WEHG6bUdDXU4WcsuusCYpm-Pqgd_uIeRhFZJDHpXmHLa_EG8eFPAhNv2kQ

POST https://api.cirro.io/v1/bulk/gigs/:gig_id/gig_invitations

Parameters

{"data":{"attributes":{"worker-filter":{"filter-query":"{ \"app_worker_id\": { \"$in\": [27, 28] } }"}},"type":"gig-invitations"}}
Name Description
gig_id required ID of the gig
attributes[worker_filter] required Filter workers to invite
attributes[auto_accept] Whether or not to accept the invitations automatically
type required MUST be gig-invitations

Response

Content-Type: application/json; charset=utf-8
201 Created
{
  "data": [
    {
      "id": "17",
      "type": "gig-invitations",
      "links": {
        "self": "/api/v1/gig-invitations/17"
      },
      "attributes": {
        "status": "pending",
        "gig-id": 17,
        "app-worker-id": 27
      }
    },
    {
      "id": "18",
      "type": "gig-invitations",
      "links": {
        "self": "/api/v1/gig-invitations/18"
      },
      "attributes": {
        "status": "pending",
        "gig-id": 17,
        "app-worker-id": 28
      }
    }
  ]
}

Get a gig invitation

Request

Endpoint

GET https://api.cirro.io/v1/gig-invitations/89
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwMzh9.rgo16whCxxLq3_lNeIMHczab2US8yZR1d6BdQwBk29nFVracyjqJWx7wvvVn-2TuxmFpOPJ4O46VR_oYs8u_rU22Ga3Hy9NiQACNfDI-ktydhezBHQBs8vlaW0FCPpvFwEvQZn00k1F6HLMbIjeVhy7ctLIPF8-3xMJlpxeWQ619IczSTTQ4nRjuOlVe_66g_nI4TP_dfcp0wkxKMXxf656hHQA4OqjLiuSgQfizzir-SYDdMRUtGnm-IYlDqr4BuQzR6cnYYZxK3WaaBIMUVWLue310YWXTNgqgnZ_SFT0pd_0PH4wnfsYurVmSfCdYUwUEp6lQJsne5d1hYCp5-w

GET https://api.cirro.io/v1/gig-invitations/:id

Parameters

Name Description
id required ID of the gig invitation

Response

Content-Type: application/vnd.api+json
200 OK
{
  "data": {
    "id": "89",
    "type": "gig-invitations",
    "links": {
      "self": "https://api.cirro.io/api/v1/gig-invitations/89"
    },
    "attributes": {
      "status": "pending",
      "gig-id": 102,
      "app-worker-id": 121
    }
  }
}

Get a list of gig invitations

Request

Endpoint

GET https://api.cirro.io/v1/gig-invitations
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwMzJ9.NJMEUklangduaKydT-N3OCdP1wshM28T9VEUOPXucmZ9vX7oOFs4lmG6PdDpyhtDrmA6UApFVuTn1XLq_TOGsXRGAjsDM1eYcYq-231xeAu12xIGj_6d8sp0IN9XYe0z9PMqQc4ILKvSBaWdKub7MAm_Ny5fusQ0zq3utXBnm7NWlaAR9_kYoNwc3n-wxY89O7PJOp7QzV3xN_2yPbYN7JUgXnsYbCrBpn75CIYrU200AkTK4Ym_PnpdiYwpc9SmJ8d1tSikXkVG9x8No8YyZLmryk2hnYNrLNRKytcXOlTG9-tibSy7nAMPgLRUeCqdNXQKc9MGrOb01wXuaDJ4Eg

GET https://api.cirro.io/v1/gig-invitations

Parameters

{"data":{"filter":{}}}: 
Name Description
filter[status] Current status
filter[gig_id] ID(s) of a gig to invite to
filter[app_worker_id] ID(s) of an app worker invited
filter[created_since] Created after

Response

Content-Type: application/vnd.api+json
200 OK
{
  "data": [
    {
      "id": "45",
      "type": "gig-invitations",
      "links": {
        "self": "https://api.cirro.io/api/v1/gig-invitations/45"
      },
      "attributes": {
        "status": "accepted",
        "gig-id": 37,
        "app-worker-id": 56
      }
    },
    {
      "id": "46",
      "type": "gig-invitations",
      "links": {
        "self": "https://api.cirro.io/api/v1/gig-invitations/46"
      },
      "attributes": {
        "status": "accepted",
        "gig-id": 38,
        "app-worker-id": 57
      }
    }
  ]
}

Update a gig invitation

Request

Endpoint

PATCH https://api.cirro.io/v1/gig-invitations/91
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwMzl9.spkGqZoFUtBcFlsgEGBUuAh1qxfqPbB5EWGg1cBYMVaFnJUBXwCa1FBMELT_TB2iwQbv055vC0qsNdW3v8vOp_Dq_HoI_zoKGfeEupUsMXrpCKCPr-FsNvG3nskhwruBYL7vUX2z2PJ_awvIKUGdVOvzfcPJ1BOmZKX9MIKZ26MQndcdwiSLk77C2wsyTHQiRElUWfahPMX6BlXstCpkzSR0y1co4TU7y7Xlsvs62S5KevfLfF5enkAuD4zOilXAQ44p_j4elmDsWhsExEqkQnYodz0kgYbe_YKZIzaih6ITN2_wSAPGMiaPh9UJjznA3f9xMoSbxmt51QcCHcMjsg

PATCH https://api.cirro.io/v1/gig-invitations/:id

Parameters

{"data":{"type":"gig-invitations","attributes":{"status":"rejected"},"id":91}}
Name Description
id required ID of the gig invitation
type required MUST be gig-invitations
attributes[status] required Status

Response

Content-Type: application/vnd.api+json
200 OK
{
  "data": {
    "id": "91",
    "type": "gig-invitations",
    "links": {
      "self": "https://api.cirro.io/api/v1/gig-invitations/91"
    },
    "attributes": {
      "status": "rejected",
      "gig-id": 106,
      "app-worker-id": 125
    }
  }
}

Update a gig invitation

Request

Endpoint

PUT https://api.cirro.io/v1/gig-invitations/98
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwNDF9.HyreGVbJZpKQWjm3ZGQ4V6Q50RVmhpUUTmGlWt8s8nUeorAoiYkaNjiftysnBCvIyoCe0SHdn7GcnRWY7b_21owTWEa_vGtUFD6LR-cTB6AQjXAm5awE14bAUS94kIeyia8woALpEiXuEmXsWNDOh_cK5wMwJoc5s1a2xSpE07vBaymKCZmihC6aKpBArFSKpAjI1x09H1JDAz3Bk0LbbAFo6o5M0j5H9FWvfgBh2VM_Ft3wvuWKJVS5ftLCycPlWEA1kmjod4AuSxYjqGKJ7eCGBvRFHpVCmBnJMfNel855FjnbLsgSyKCwHKksQqCUIJzSjNsV8enpnOOkKQFtAw

PUT https://api.cirro.io/v1/gig-invitations/:id

Parameters

{"data":{"type":"gig-invitations","attributes":{"status":"accepted"},"id":98}}
Name Description
id required ID of the gig invitation
type required MUST be gig-invitations
attributes[status] required Status

Response

Content-Type: application/vnd.api+json
200 OK
{
  "data": {
    "id": "98",
    "type": "gig-invitations",
    "links": {
      "self": "https://api.cirro.io/api/v1/gig-invitations/98"
    },
    "attributes": {
      "status": "accepted",
      "gig-id": 120,
      "app-worker-id": 139
    }
  }
}

GigResults

Create gig result

Request

Endpoint

POST http://api.cirro.io/v1/gig-results
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwNDJ9.TxJWxg6YFACwYwtNvdb-0iIp50Pq4NmBO8bmPrOZLZTGzQbAZ2HUNtvbMvypR9d9Q3bFUSzHgKT0ZhvqKAg1irphJzUWZaCDzOzvDxw8FMDzo_8x6vPEvvuw-cnyib8bU7ZTbKW_384pR7SIQOBKNELWGSimhmXIfas3SJWCMdO7w6_bjvckM2PVBtfME2ysefpd8H-G4ZDOuGmX2CHFDVhHNjYTPVlMhoiAgRDuIhCqhl69Opn-uw_epimftGINyOi5570eInyKaBk4UbFyCjWkJb7sGCASw2OZ6xErlr7lA4FuhInmqWhuov9RdKSzSARFOalOMAZwy4kHegswCw

POST http://api.cirro.io/v1/gig-results

Parameters

{"data":{"type":"gig-results","attributes":{"title":"Batman Begins","description":"All right, Mr. DeMille, I'm ready for my closeup.","quantity":2,"multiplier":"1.0","cost-center-data":"{\"customer_id\":\"1234\",\"company\":\"Schinner, Brakus and Ortiz\",\"legal_entity\":\"GmbH\",\"inhouse\":\"no\"}","delivery-date":"2022-06-13T09:14:02.971Z"},"relationships":{"gig-task":{"data":{"type":"gig-tasks","id":12}},"app-worker":{"data":{"type":"app-workers","id":152}}}}}
Name Description
type required Should always be set to gig-results.
attributes[title] required Title of the gig result
attributes[description] Description of the gig result
attributes[quantity] required Quantity of completed tasks
attributes[multiplier] A factor in the range of 0.0000 - 9.9999 which will be multiplied to the base price for the completed task. Use it to give your payout a boost or a reduction. The end payout is calculated as following: quantity x task.base_price x multiplier. By default multiplier = 1.0
attributes[external-customer-id] DEPRECATED use cost-center-key and cost-center-name instead:You can use this optional field to keep track of COGS and payouts for a customer in your space.
attributes[cost-center-key] required A EPAM project code for book keeping in finance. It is required if cost_center_data is not given.
attributes[cost-center-data] required A json string containing customer details: customer_id, company, legal_entity and inhouse. It is required if cost_center_key is not given.
attributes[delivery-date] When did the worker perform the work, by default it equals to the creation time of the gig result
relationships[gig-task] required Associate the gig result to a gig task
relationships[app-worker] required Associate the gig result to an app worker

Response

Content-Type: application/vnd.api+json
201 Created
{
  "data": {
    "id": "7",
    "type": "gig-results",
    "links": {
      "self": "http://api.cirro.io/api/v1/gig-results/7"
    },
    "attributes": {
      "title": "Batman Begins",
      "description": "All right, Mr. DeMille, I'm ready for my closeup.",
      "quantity": 2,
      "multiplier": "1.0",
      "external-customer-id": null,
      "delivery-date": "2022-06-13",
      "cost-center-key": null,
      "cost-center-data": {
        "company": "Schinner, Brakus and Ortiz",
        "inhouse": "no",
        "customer_id": "1234",
        "legal_entity": "GmbH"
      }
    }
  }
}

GigTasks

Create a gig task

Request

Endpoint

POST https://api.cirro.io/v1/gig-tasks
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwNDV9.vLkx2j9UGCaVpe64O-BqCRGCUUBs7obq2NfEhkMaol6eBPqz73FZDXxRRgwmjZfkoM2DPqcutBbau6vxLmi6wgac-ZOpKj5TrzUaJtBucTu9OlMpFLeedvaAxpk3hlN3YuW4GiiQ2L-PQwv816apuiVYQKls2Yk2Hruh4vmB-km2GJW0nJtj_NY_kk1zL5PXINIOsUZvBzPwhWU2hussyhIzfHgA1A41Ju1vUnJZVo-66eZtjgzGIhmnlZUJAYBoPx0sDLBbbI6HfjThR0ajkGBe3jOL3oid5_G1W9xr9KVCBatOcwFxxHfisq-z4pGJJyVUdffMNDT4zjOEVIiLcQ

POST https://api.cirro.io/v1/gig-tasks

Parameters

{"data":{"type":"gig-tasks","attributes":{"title":"All Passion Spent","base-price":400},"relationships":{"gig":{"data":{"type":"gigs","id":"149"}}}}}
Name Description
type required MUST be gig-tasks
attributes[title] required Title
attributes[base_price] required Reward the worker will get after completing the task (in cents, e.g. 100 = 1€)
relationships[gig] required Parent gig

Response

Content-Type: application/vnd.api+json
201 Created
{
  "data": {
    "id": "27",
    "type": "gig-tasks",
    "links": {
      "self": "https://api.cirro.io/api/v1/gig-tasks/27"
    },
    "attributes": {
      "title": "All Passion Spent",
      "base-price": 400
    }
  }
}

Update a gig task

Request

Endpoint

PATCH https://api.cirro.io/v1/gig-tasks/31
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwNDZ9.trCAZBicwIGnSCt9bxR_bIrVeshnTCZTKI68L_rmu1d0pKoHSkRZuKUAebX6Zf4EqW5THZNOParXFk0BtNDjUBxnwZxyTvk1pZKudRQZWA8LWlDrqYjrAj2Zwl4nOfPE-Ea6BSA7JjEfj7jxjHc8LvpY5T-CLR4gorRTwc997NnUJkdIDJ5mGivDHDFccFXFL6-J7H4TbXgdHVm8zMYAQJwS8MN-zGIMIykJwpWVTp5A8LWiUs5Os_Kb_YS8SJEgIyHlIPh0037qMPnce2qfsePF4akqFuM5HXPamlVo_-6F9MbZJr9QBp7NT-YfW06puUd71FGJ-7DuPrWZl8S81w

PATCH https://api.cirro.io/v1/gig-tasks/:id

Parameters

{"data":{"type":"gig-tasks","attributes":{"title":"Quo Vadis","base-price":1000},"relationships":{"gig":{"data":{"type":"gigs","id":"157"}}},"id":31}}
Name Description
id required ID of the gig task
type required MUST be gig-tasks
attributes[title] Title
attributes[base_price] Reward the worker will get after completing the task (in cents, e.g. 100 = 1€)
relationships[gig] Parent gig

Response

Content-Type: application/vnd.api+json
200 OK
{
  "data": {
    "id": "31",
    "type": "gig-tasks",
    "links": {
      "self": "https://api.cirro.io/api/v1/gig-tasks/31"
    },
    "attributes": {
      "title": "Quo Vadis",
      "base-price": 1000
    }
  }
}

Update a gig task

Request

Endpoint

PUT https://api.cirro.io/v1/gig-tasks/34
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwNDd9.oPecyiOZN0OTSyyK1rXsizfx0rn8AZLeF5Ey-UCcjKW7T3yizCXUtbtuB5lDc1L8G8p3Y3U9tlhUpD-_jp_UEOcWg0hEvlAsBpJVw47NDQUxtuUJGa1HH48hqW--Fo_GF7546JOHuXLeImeq2QC62Wd3xV29Fglju5UyUMQa2skFc_9i95_UPAOM3qk1J_wueWGWk4XkUU-tnYa-4X76q_H0MDsmDKoszAZwE2idbZ8nqSTXYh5l288IdWlxAKpKqU-ZnM2dsFsmg7Hg61xKgfAQZb4dQsUnmYi-Y7q3FIAxeLyORsbE2lzxHSb5Pb8eHaLzlRpC_Z51o9cknKWZhg

PUT https://api.cirro.io/v1/gig-tasks/:id

Parameters

{"data":{"type":"gig-tasks","attributes":{"title":"Have His Carcase","base-price":400},"relationships":{"gig":{"data":{"type":"gigs","id":"160"}}},"id":34}}
Name Description
id required ID of the gig task
type required MUST be gig-tasks
attributes[title] Title
attributes[base_price] Reward the worker will get after completing the task (in cents, e.g. 100 = 1€)
relationships[gig] Parent gig

Response

Content-Type: application/vnd.api+json
200 OK
{
  "data": {
    "id": "34",
    "type": "gig-tasks",
    "links": {
      "self": "https://api.cirro.io/api/v1/gig-tasks/34"
    },
    "attributes": {
      "title": "Have His Carcase",
      "base-price": 400
    }
  }
}

GigTimeActivities

Create a gig time activity

Request

Endpoint

POST https://api.cirro.io/v1/gig-time-activities
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwNDd9.FSKrH3brnojS6bnCoZVpluZrRh6VjV_A1oA0X4bgsMma1v_S9Zdo1ku0U-z2FbYYxkhwuxQeQZl-IXzM1ZvmBWLNcMwCABiLSsxkTG8gSaytFFGmcB2WhHGAtdbCEw2Etld_dzCvLb8wqHqSvXh0QQcQgigNQb-guTBLPu7Ar6uPT5kTnTr7MAJa-GNYhbMa4zd8bcam3duk4vLiIdUtTXpCoSOOZ0_m3nHyy_JqBWlLwbIJIg_C8bkFmC1EBP-xN7VYZg0Kkv8B0BVO-W1ilI77sgqZ8HRHSFbwmM5XarTfSduI6y69CkDh39rHw3rBNitO6m9TAxWdL6Bct_ME4A

POST https://api.cirro.io/v1/gig-time-activities

Parameters

{"data":{"type":"gig-time-activities","attributes":{"date":"2022-06-19","description":"Commodi excepturi et eum.","duration-in-ms":7200000},"relationships":{"gig":{"data":{"type":"gigs","id":"163"}},"app-worker":{"data":{"type":"app-workers","id":"159"}}}}}
Name Description
type required MUST be gig-time-activities
attributes[date] required Date of the activity
attributes[description] required Description
attributes[duration_in_ms] required Duration in milliseconds
relationships[gig] required Gig the worker worked on
relationships[app_worker] required The responsible worker

Response

Content-Type: application/vnd.api+json
201 Created
{
  "data": {
    "id": "7",
    "type": "gig-time-activities",
    "links": {
      "self": "https://api.cirro.io/api/v1/gig-time-activities/7"
    },
    "attributes": {
      "description": "Commodi excepturi et eum.",
      "duration-in-ms": 7200000,
      "date": "2022-06-19"
    }
  }
}

Gigs

Archive a gig with gig results and time activities

Request

Endpoint

POST http://api.cirro.io/v1/bulk/gigs/29/archive
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NDA5OTk0MDB9.ikjkdjx294lj4q5ckSPT7UBfVKXIHRx9Q8eRLMfsB5Ty8sV2UrDNQxsIOv6FiQmRkvHiT4gdNLWdNhll_c7OvvfbXxHbfjYiQsfcnc4HZfvqDObMso7W5h_At1DIJyV1GyfVDFsoDBd2ExAM8CnIuH4c5j7Lru0ZIkRprz_yeLKF9WH81BY4k2Cmo6sE0PMAHOGeYZJWB70ONGG9QxVNspn4G6nKg5vSYayIVjvA4Ty5QhGVmhGW-n7GBy6laskHR2JtMf_oBCZRABs38-7PYERpjd8OTm5ZocxEyYYwyVsvynI_HLDFV2oyr8mzA-FTMvOVStzRN0q44MOYvRSheg

POST http://api.cirro.io/v1/bulk/gigs/:gig_id/archive

Parameters

{"data":{"relationships":{"gig-results":[{"relationships":{"app-worker":{"data":{"id":43}},"gig-task":{"data":{"id":2}}},"title":"The Shawshank Redemption","delivery-date":"2021-12-30T01:00:00.000Z","description":"What we've got here is failure to communicate.","quantity":2,"cost-center-key":"123456"},{"relationships":{"app-worker":{"data":{"id":44}},"gig-task":{"data":{"id":2}}},"title":"Braveheart","delivery-date":"2021-12-30T01:00:00.000Z","description":"Toto, I've got a feeling we're not in Kansas anymore.","quantity":2,"cost-center-key":"123456"}],"gig-time-activities":[{"relationships":{"app-worker":{"data":{"id":43}}},"description":"I love the smell of napalm in the morning.","date":"2022-01-01T01:00:00.000Z","duration-in-ms":360000},{"relationships":{"app-worker":{"data":{"id":44}}},"description":"May the Force be with you.","date":"2022-01-01T01:00:00.000Z","duration-in-ms":360000}]}}}
Name Description
relationships[gig-results] Create multiple gig results for the given gig. If the given gig has only 1 gig task, the gig_task_id will be automatically set to this task. Example: [{ relationships: { app-worker: { data: { id: 1 } } }, title: 'Completed Task1', description: 'Thank you for your work!', quantity: 2, multiplier: 2.5 }, ...]
relationships[gig-time-activities] Create multiple gig time activities for the given gig. Example: [{ relationships: { app-worker: { data: { id: 1 } } }, description: 'Complete work for gig #1', date: '2020-09-28 11:32:46 UTC', duration_in_ms: 360000 }, ...]

Response

Content-Type: application/json; charset=utf-8
201 Created
{
  "data": {
    "id": "29",
    "type": "gigs",
    "links": {
      "self": "/api/v1/gigs/29"
    },
    "attributes": {
      "title": "To Say Nothing of the Dog",
      "description": "The orthogonal features, when combined, can explode into complexity.",
      "url": "http://haag.com/yen",
      "automatic-invites": false,
      "invitation-mode": "manual",
      "total-seats": 2,
      "archive-at": "2022-01-01T01:00:00.000Z",
      "end-at": "2022-01-01T01:00:00.000Z",
      "archived-at": null,
      "start-at": "2022-01-30T01:52:02.000Z",
      "extra-mile": false,
      "notification-payload": {
      },
      "invitation-multiplier": 1
    },
    "relationships": {
      "gig-tasks": {
        "links": {
          "self": "/api/v1/gigs/29/relationships/gig-tasks",
          "related": "/api/v1/gigs/29/gig-tasks"
        }
      },
      "gig-results": {
        "data": [
          {
            "type": "gig-results",
            "id": "1"
          },
          {
            "type": "gig-results",
            "id": "2"
          }
        ]
      },
      "gig-time-activities": {
        "data": [
          {
            "type": "gig-time-activities",
            "id": "1"
          },
          {
            "type": "gig-time-activities",
            "id": "2"
          }
        ]
      }
    }
  },
  "included": [
    {
      "id": "1",
      "type": "gig-results",
      "links": {
        "self": "/api/v1/gig-results/1"
      },
      "attributes": {
        "title": "The Shawshank Redemption",
        "description": "What we've got here is failure to communicate.",
        "quantity": 2,
        "multiplier": "1.0",
        "external-customer-id": "123456",
        "delivery-date": "2021-12-30",
        "cost-center-key": "123456",
        "cost-center-data": null
      }
    },
    {
      "id": "2",
      "type": "gig-results",
      "links": {
        "self": "/api/v1/gig-results/2"
      },
      "attributes": {
        "title": "Braveheart",
        "description": "Toto, I've got a feeling we're not in Kansas anymore.",
        "quantity": 2,
        "multiplier": "1.0",
        "external-customer-id": "123456",
        "delivery-date": "2021-12-30",
        "cost-center-key": "123456",
        "cost-center-data": null
      }
    },
    {
      "id": "1",
      "type": "gig-time-activities",
      "links": {
        "self": "/api/v1/gig-time-activities/1"
      },
      "attributes": {
        "description": "I love the smell of napalm in the morning.",
        "duration-in-ms": 360000,
        "date": "2022-01-01"
      },
      "relationships": {
        "gig": {
          "data": {
            "type": "gigs",
            "id": "29"
          }
        }
      }
    },
    {
      "id": "2",
      "type": "gig-time-activities",
      "links": {
        "self": "/api/v1/gig-time-activities/2"
      },
      "attributes": {
        "description": "May the Force be with you.",
        "duration-in-ms": 360000,
        "date": "2022-01-01"
      },
      "relationships": {
        "gig": {
          "data": {
            "type": "gigs",
            "id": "29"
          }
        }
      }
    }
  ]
}

Attach gig results in bulk

Request

Endpoint

PATCH https://api.cirro.io/v1/gigs/191
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwNTR9.UnHr6gxmUN9btI6Hjox3ORF966oDEF1qUoHbbUvorxwilNn6sGNrO4XqpBRJPcjX8OmuXn6uyOY9aEQ-rPeKEdQ-J3EqndTv8HuAGUjg-Y0Y4Rzify1fJGFrdMkvc7iO6gQ1YLG57olH3G_4Z2SkMP_eoP5zlWDlEAhtLKXKVnCzZ_PwCdGxJIQU3K81nlYBv-ls5O9zSaTlPt92hhM7mgsQc9zqARTI3gMAn2dwDZN_zX-mf3nzvX-8CrT8fNJlnmDYnnH-e4p5Eks1nIyPRIicmR422w4Wo1DpgV1do9-M93LMekvOXrtYV8PU9N9P-QPJb_dXIKCAQvWOOKPMWg

PATCH https://api.cirro.io/v1/gigs/:id

Parameters

{"data":{"type":"gigs","attributes":{"title":"Consider Phlebas","description":"The orthogonal features, when combined, can explode into complexity.","url":"http://rosenbaum-barton.io/renna","start-at":"2022-06-14T07:47:40.000Z","end-at":"2022-07-24T14:55:09.000Z","total-seats":5,"automatic-invites":false,"extra-mile":false,"invitation-multiplier":1},"relationships":{"worker-filter":{"data":{"type":"worker-filters","id":"#CFC3A67C2F8AD223"}},"gig-results":{"data":[{"type":"gig-results","id":"#D6FDCE1EE8388B04"},{"type":"gig-results","id":"#F9E87638A2E660EC"}]},"gig-time-activities":{"data":[{"type":"gig-time-activities","id":"#00829E257C9459C4"},{"type":"gig-time-activities","id":"#2BBD01C735420EBD"}]}},"id":191},"included":[{"type":"worker-filters","id":"#CFC3A67C2F8AD223","attributes":{"filter-query":"{}"}},{"type":"gig-results","id":"#D6FDCE1EE8388B04","attributes":{"title":"a","description":"Fasten your seatbelts. It's going to be a bumpy night.","quantity":1,"multiplier":"1.0","external-customer-id":"EPM-CRWD","delivery-date":"2022-06-20","cost-center-key":"EPM-CRWD"},"relationships":{"gig-task":{"data":{"type":"gig-tasks","id":"47"}},"app-worker":{"data":{"type":"app-workers","id":"173"}}}},{"type":"gig-results","id":"#F9E87638A2E660EC","attributes":{"title":"iure","description":"I'm going to make him an offer he can't refuse.","quantity":1,"multiplier":"1.0","external-customer-id":"EPM-CRWD","delivery-date":"2022-06-20","cost-center-key":"EPM-CRWD"},"relationships":{"gig-task":{"data":{"type":"gig-tasks","id":"47"}},"app-worker":{"data":{"type":"app-workers","id":"174"}}}},{"type":"gig-time-activities","id":"#00829E257C9459C4","attributes":{"description":"Repellat omnis aut nulla.","duration-in-ms":7200000,"date":"2022-06-19"},"relationships":{"app-worker":{"data":{"type":"app-workers","id":"173"}}}},{"type":"gig-time-activities","id":"#2BBD01C735420EBD","attributes":{"description":"Animi explicabo illum inventore.","duration-in-ms":7200000,"date":"2022-06-19"},"relationships":{"app-worker":{"data":{"type":"app-workers","id":"174"}}}}]}
Name Description
id required ID of the gig
type required MUST be gigs
attributes[title] Title
attributes[description] Description
attributes[url] URL
attributes[start_at] When to start the gig
attributes[end_at] When to end the gig
attributes[total_seats] Number of workers allowed
attributes[automatic_invites] Auto-invite workers
attributes[extra_mile] Report time activities to EPAM extra mile time package
attributes[invitation_multiplier] This multiplier x #open seats left = #invitations sent out each wave
relationships[worker_filter] A filter for workers
relationships[gig_tasks] Gig tasks. At least 1 is needed to start the invitation
relationships[gig_results] Results. If the gig has only 1 task, the gig_task_id will point to it
relationships[gig_time_activities] Time activities

Response

Content-Type: application/vnd.api+json
200 OK
{
  "data": {
    "id": "191",
    "type": "gigs",
    "links": {
      "self": "https://api.cirro.io/api/v1/gigs/191"
    },
    "attributes": {
      "title": "Consider Phlebas",
      "description": "The orthogonal features, when combined, can explode into complexity.",
      "url": "http://rosenbaum-barton.io/renna",
      "automatic-invites": false,
      "invitation-mode": "manual",
      "total-seats": 5,
      "archive-at": "2022-07-24T14:55:09.000Z",
      "end-at": "2022-07-24T14:55:09.000Z",
      "archived-at": null,
      "start-at": "2022-06-14T07:47:40.000Z",
      "extra-mile": false,
      "notification-payload": {
      },
      "invitation-multiplier": 1
    },
    "relationships": {
      "gig-tasks": {
        "links": {
          "self": "https://api.cirro.io/api/v1/gigs/191/relationships/gig-tasks",
          "related": "https://api.cirro.io/api/v1/gigs/191/gig-tasks"
        }
      }
    }
  }
}

Attach gig results in bulk

Request

Endpoint

PUT https://api.cirro.io/v1/gigs/204
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwNTh9.a0ziO4654dfjVUB3YMdp0hJJrskhwCkbH7guABIMfE9CS6w9BnkVXxR-jL1PaKUipbMSck-0LoscHou3A2BFEIFqP3s9IDK6tyc-xBupzN2yJOtO7RlwZse13sF5M0EZYZ-mXliFz1uLQCGcjpxPUQYo2OcN6YNNzHo0Q8h9Jh-XdJAHx33a7yL_948AzmLHjM01BwUPmxY88BL0Cm0gY2lHI7RTQepIlCQ5HCF2Pb2P-qCmZdwWJhYUTnwvEu9xvxkjE5J9Clil6_aQlSQPzmAkqupcUjh2pSrA1xFyU2CqhHqsSo7ay2qC8sJFB8taX8gCYWYbYhbrDvab7b5Lmg

PUT https://api.cirro.io/v1/gigs/:id

Parameters

{"data":{"type":"gigs","attributes":{"title":"Vanity Fair","description":"I didn't work hard to make Ruby perfect for everyone, because you feel differently from me. No language can be perfect for everyone. I tried to make Ruby perfect for me, but maybe it's not perfect for you. The perfect language for Guido van Rossum is probably Python.","url":"http://mann.co/jarod","start-at":"2022-06-15T08:45:46.000Z","end-at":"2022-07-20T19:21:09.000Z","total-seats":2,"automatic-invites":false,"extra-mile":false,"invitation-multiplier":1},"relationships":{"worker-filter":{"data":{"type":"worker-filters","id":"#0E1B574F0D445985"}},"gig-results":{"data":[{"type":"gig-results","id":"#1135FF69C7F2019E"},{"type":"gig-results","id":"#3820670B81A3F6C6"}]},"gig-time-activities":{"data":[{"type":"gig-time-activities","id":"#C0DA8F345A51DFEF"},{"type":"gig-time-activities","id":"#EBF536D614FF8707"}]}},"id":204},"included":[{"type":"worker-filters","id":"#0E1B574F0D445985","attributes":{"filter-query":"{}"}},{"type":"gig-results","id":"#1135FF69C7F2019E","attributes":{"title":"inventore","description":"All right, Mr. DeMille, I'm ready for my closeup.","quantity":1,"multiplier":"1.0","external-customer-id":"EPM-CRWD","delivery-date":"2022-06-20","cost-center-key":"EPM-CRWD"},"relationships":{"gig-task":{"data":{"type":"gig-tasks","id":"59"}},"app-worker":{"data":{"type":"app-workers","id":"189"}}}},{"type":"gig-results","id":"#3820670B81A3F6C6","attributes":{"title":"est","description":"Here's looking at you, kid.","quantity":1,"multiplier":"1.0","external-customer-id":"EPM-CRWD","delivery-date":"2022-06-20","cost-center-key":"EPM-CRWD"},"relationships":{"gig-task":{"data":{"type":"gig-tasks","id":"59"}},"app-worker":{"data":{"type":"app-workers","id":"190"}}}},{"type":"gig-time-activities","id":"#C0DA8F345A51DFEF","attributes":{"description":"Quis esse deserunt fugiat.","duration-in-ms":7200000,"date":"2022-06-19"},"relationships":{"app-worker":{"data":{"type":"app-workers","id":"189"}}}},{"type":"gig-time-activities","id":"#EBF536D614FF8707","attributes":{"description":"Qui placeat eum ex.","duration-in-ms":7200000,"date":"2022-06-19"},"relationships":{"app-worker":{"data":{"type":"app-workers","id":"190"}}}}]}
Name Description
id required ID of the gig
type required MUST be gigs
attributes[title] Title
attributes[description] Description
attributes[url] URL
attributes[start_at] When to start the gig
attributes[end_at] When to end the gig
attributes[total_seats] Number of workers allowed
attributes[automatic_invites] Auto-invite workers
attributes[extra_mile] Report time activities to EPAM extra mile time package
attributes[invitation_multiplier] This multiplier x #open seats left = #invitations sent out each wave
relationships[worker_filter] A filter for workers
relationships[gig_tasks] Gig tasks. At least 1 is needed to start the invitation
relationships[gig_results] Results. If the gig has only 1 task, the gig_task_id will point to it
relationships[gig_time_activities] Time activities

Response

Content-Type: application/vnd.api+json
200 OK
{
  "data": {
    "id": "204",
    "type": "gigs",
    "links": {
      "self": "https://api.cirro.io/api/v1/gigs/204"
    },
    "attributes": {
      "title": "Vanity Fair",
      "description": "I didn't work hard to make Ruby perfect for everyone, because you feel differently from me. No language can be perfect for everyone. I tried to make Ruby perfect for me, but maybe it's not perfect for you. The perfect language for Guido van Rossum is probably Python.",
      "url": "http://mann.co/jarod",
      "automatic-invites": false,
      "invitation-mode": "manual",
      "total-seats": 2,
      "archive-at": "2022-07-20T19:21:09.000Z",
      "end-at": "2022-07-20T19:21:09.000Z",
      "archived-at": null,
      "start-at": "2022-06-15T08:45:46.000Z",
      "extra-mile": false,
      "notification-payload": {
      },
      "invitation-multiplier": 1
    },
    "relationships": {
      "gig-tasks": {
        "links": {
          "self": "https://api.cirro.io/api/v1/gigs/204/relationships/gig-tasks",
          "related": "https://api.cirro.io/api/v1/gigs/204/gig-tasks"
        }
      }
    }
  }
}

Create a gig

Request

Endpoint

POST https://api.cirro.io/v1/gigs
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwNTB9.8LfV8oG316UDidTeNUbKCwPg9_NhvNLPlgkZOnMoYRhFt0wCAfC2tPJ173gdvfnMSvleqw54RCDx5mNo0xv3hSf53TpnMfoj8Wy26lz7CDPyyNCdMqcYXlSxd_guSFpX05CEUb6bsREi4emLwmDjQCWHqRx5Q0uIqoBBZGQsqNdu0VkdAK5cw9HmTRrVZFmKik-BYs0ysfGQVDmJDvJxfT0tLgVc8bEGfFgd_cbOX8zc0yjuwCs69CQJTvH4tEm72jhpLKfkacBDm6cvB9hg9NM8Jfo9HwJUxQdfNitNskMHSaQ7aBCmt2CU5Zy2cgIfjJ0V2Hp6osqDuIwth6mkIA

POST https://api.cirro.io/v1/gigs

Parameters

{"data":{"type":"gigs","attributes":{"title":"Arms and the Man","description":"Ruby inherited the Perl philosophy of having more than one way to do the same thing. I inherited that philosophy from Larry Wall, who is my hero actually. I want to make Ruby users free. I want to give them the freedom to choose.","url":"http://yost-walker.co/daren","start-at":"2022-06-04T03:35:02.000Z","end-at":"2022-07-20T05:20:33.000Z","total-seats":5,"automatic-invites":false,"extra-mile":false,"notification-payload":{},"invitation-multiplier":1},"relationships":{"worker-filter":{"data":{"type":"worker-filters","id":"174"}}}}}
Name Description
type required MUST be gigs
attributes[title] required Title
attributes[description] required Description
attributes[url] required URL
attributes[start_at] When to start the gig
attributes[end_at] required When to end the gig
attributes[total_seats] required Number of workers allowed
attributes[automatic_invites] required Auto-invite workers
attributes[extra_mile] Report activities to EPAM extra mile time package
attributes[notification_payload] Data payload can be used later to populate notifications
attributes[invitation_multiplier] This multiplier x #open seats left = #invitations sent out each wave
relationships[worker_filter] required A filter for workers
relationships[gig_tasks] Gig tasks. At least 1 is needed to start the invitation

Response

Content-Type: application/vnd.api+json
201 Created
{
  "data": {
    "id": "173",
    "type": "gigs",
    "links": {
      "self": "https://api.cirro.io/api/v1/gigs/173"
    },
    "attributes": {
      "title": "Arms and the Man",
      "description": "Ruby inherited the Perl philosophy of having more than one way to do the same thing. I inherited that philosophy from Larry Wall, who is my hero actually. I want to make Ruby users free. I want to give them the freedom to choose.",
      "url": "http://yost-walker.co/daren",
      "automatic-invites": false,
      "invitation-mode": "manual",
      "total-seats": 5,
      "archive-at": "2022-07-20T05:20:33.000Z",
      "end-at": "2022-07-20T05:20:33.000Z",
      "archived-at": null,
      "start-at": "2022-06-04T03:35:02.000Z",
      "extra-mile": false,
      "notification-payload": {
      },
      "invitation-multiplier": 1
    },
    "relationships": {
      "gig-tasks": {
        "links": {
          "self": "https://api.cirro.io/api/v1/gigs/173/relationships/gig-tasks",
          "related": "https://api.cirro.io/api/v1/gigs/173/gig-tasks"
        }
      }
    }
  }
}

Create a gig with tasks

Request

Endpoint

POST https://api.cirro.io/v1/gigs
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwNTF9.j7pVpPVxSu1cF_QEZKCF9JWpOYVVS1kuC06P9yXNfG13YndA2DRE5jZAn5ZP5j-gj8W6M9p7sKB0VbnwrQiM64_8qVAPpM4Y9Te8k_cTlVXqUylBar5Ykc9Vt7FbJncypocNrA9FbloFw8tu8NeEsjwVn9EQmGN2z3fTJr7g8SpD6dslLQdPIisaBfwg5AogHyEy4EjRVRXZGhUbfOkMVy6CcfriRw4kGYPYHTbd14KYHUYPONkRMh2_80uT77kwDwSuFNCmnpEyaXbto4IflkEdG-_rgAYFT_z1qxUjcR7nQHJDM_ASGkjrYTDJSDqMtdRng0h6TB-9kBTyme1d7g

POST https://api.cirro.io/v1/gigs

Parameters

{"data":{"type":"gigs","attributes":{"title":"I Sing the Body Electric","description":"Sometimes people jot down pseudo-code on paper. If that pseudo-code runs directly on their computers, its best, isn't it? Ruby tries to be like that, like pseudo-code that runs. Python people say that too.","url":"http://kunze-langosh.io/xavier_langosh","start-at":"2022-06-12T08:31:52.000Z","end-at":"2022-07-10T21:56:40.000Z","total-seats":5,"automatic-invites":false,"extra-mile":false,"notification-payload":{},"invitation-multiplier":1},"relationships":{"worker-filter":{"data":{"type":"worker-filters","id":"182"}},"gig-tasks":{"data":[{"type":"gig-tasks","id":"#D5AB803640639284"},{"type":"gig-tasks","id":"#FC462BD01A117BAD"}]}}},"included":[{"type":"gig-tasks","id":"#D5AB803640639284","attributes":{"title":"This Lime Tree Bower","base-price":700}},{"type":"gig-tasks","id":"#FC462BD01A117BAD","attributes":{"title":"The Wind's Twelve Quarters","base-price":600}}]}
Name Description
type required MUST be gigs
attributes[title] required Title
attributes[description] required Description
attributes[url] required URL
attributes[start_at] When to start the gig
attributes[end_at] required When to end the gig
attributes[total_seats] required Number of workers allowed
attributes[automatic_invites] required Auto-invite workers
attributes[extra_mile] Report activities to EPAM extra mile time package
attributes[notification_payload] Data payload can be used later to populate notifications
attributes[invitation_multiplier] This multiplier x #open seats left = #invitations sent out each wave
relationships[worker_filter] required A filter for workers
relationships[gig_tasks] Gig tasks. At least 1 is needed to start the invitation

Response

Content-Type: application/vnd.api+json
201 Created
{
  "data": {
    "id": "177",
    "type": "gigs",
    "links": {
      "self": "https://api.cirro.io/api/v1/gigs/177"
    },
    "attributes": {
      "title": "I Sing the Body Electric",
      "description": "Sometimes people jot down pseudo-code on paper. If that pseudo-code runs directly on their computers, its best, isn't it? Ruby tries to be like that, like pseudo-code that runs. Python people say that too.",
      "url": "http://kunze-langosh.io/xavier_langosh",
      "automatic-invites": false,
      "invitation-mode": "manual",
      "total-seats": 5,
      "archive-at": "2022-07-10T21:56:40.000Z",
      "end-at": "2022-07-10T21:56:40.000Z",
      "archived-at": null,
      "start-at": "2022-06-12T08:31:52.000Z",
      "extra-mile": false,
      "notification-payload": {
      },
      "invitation-multiplier": 1
    },
    "relationships": {
      "gig-tasks": {
        "links": {
          "self": "https://api.cirro.io/api/v1/gigs/177/relationships/gig-tasks",
          "related": "https://api.cirro.io/api/v1/gigs/177/gig-tasks"
        }
      }
    }
  }
}

Create a gig with tasks and worker filter

Request

Endpoint

POST http://api.cirro.io/v1/bulk/gigs
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NDA5OTk0MDB9.YUWua6s9ffp3SBPM9KXDUhNB8Mb0PiZ3n2L8mYGn2KTn4S_3PsdyGhQ5kdYq8_dA4w42yKbnzEH1VLEXfOzpWrJ-AI5x9bpVz6_WyHy6vtp8cVrXikDxAvnTfK7w77PUXPUyfY6zi3oYS-qYAYjQorcf6y5kTO9wS2laJJLAeAMRh3ry4lTnvW0ybmGrkRs4FHkRA-xogxm9X192lRoboy0B_F_p-J7N2MDle3IqS_eTysu4U6KTohwhJIskYy-m4keZV_5y5v2N4B7ObTe0vtgjQqW6_5cy12PTTFuG7yxYN-L0bH-Fx3Z8I0w1zk765wAjaEcuw1z6tg_hl3kaGg

POST http://api.cirro.io/v1/bulk/gigs

Parameters

{"data":{"attributes":{"title":"Life of Brian","description":"Frankly, my dear, I don’t give a damn.","url":"http://mueller.info/sabina_gorczany","automatic-invites":true,"extra-mile":true,"end-at":"2022-01-31T01:00:00.000Z","start-at":"2022-01-01T01:00:00.000Z","total-seats":5,"notification-payload":{"project-title":"Sample IO"}},"relationships":{"worker-filter":{"filter-query":"{ \"size.h\": { \"$lt\": 15 }, \"size.uom\": \"in\", \"status\": \"D\" }"},"gig-tasks":[{"title":"No Country for Old Men","base-price":300},{"title":"The Help","base-price":100}]}}}
Name Description
attributes[title] Title of the gig
attributes[description] More details about the gig
attributes[url] Where to find the gig
attributes[automatic-invites] Whether to invite workers automatically
attributes[invitation-mode] Whether to invite workers automatically, allowed values: ["auto", "manual"], by default manual
attributes[extra-mile] Whether to log time activities inside this gig to the epam extra mile time package
attributes[end-at] When to end the gig
attributes[start-at] When to start the gig. By default start at is time now
attributes[total-seats] Allowed total number of accepted worker invitations
attributes[notification-payload] Data payload can be used later to populate notifications
relationships[worker-filter] required Associate the gig to a worker filter. Example: { filter-query: '{ "age": { "$lt": 50 } }' }
relationships[gig-tasks] required Specify tasks inside the gig. We will not start invitation unless there is at least 1 gig task present. Example: [{ title: 'Task1', base-price: 100 }, { title: 'Task2', base-price: 200 }]

Response

Content-Type: application/json; charset=utf-8
201 Created
{
  "data": {
    "id": "35",
    "type": "gigs",
    "links": {
      "self": "/api/v1/gigs/35"
    },
    "attributes": {
      "title": "Life of Brian",
      "description": "Frankly, my dear, I don’t give a damn.",
      "url": "http://mueller.info/sabina_gorczany",
      "automatic-invites": true,
      "invitation-mode": "auto",
      "total-seats": 5,
      "archive-at": "2022-01-31T01:00:00.000Z",
      "end-at": "2022-01-31T01:00:00.000Z",
      "archived-at": null,
      "start-at": "2022-01-01T01:00:00.000Z",
      "extra-mile": true,
      "notification-payload": {
        "project_title": "Sample IO"
      },
      "invitation-multiplier": 1
    },
    "relationships": {
      "worker-filter": {
        "data": {
          "type": "worker-filters",
          "id": "35"
        }
      },
      "gig-tasks": {
        "links": {
          "self": "/api/v1/gigs/35/relationships/gig-tasks",
          "related": "/api/v1/gigs/35/gig-tasks"
        },
        "data": [
          {
            "type": "gig-tasks",
            "id": "10"
          },
          {
            "type": "gig-tasks",
            "id": "11"
          }
        ]
      }
    }
  },
  "included": [
    {
      "id": "10",
      "type": "gig-tasks",
      "links": {
        "self": "/api/v1/gig-tasks/10"
      },
      "attributes": {
        "title": "No Country for Old Men",
        "base-price": 300
      },
      "relationships": {
        "gig": {
          "data": {
            "type": "gigs",
            "id": "35"
          }
        }
      }
    },
    {
      "id": "11",
      "type": "gig-tasks",
      "links": {
        "self": "/api/v1/gig-tasks/11"
      },
      "attributes": {
        "title": "The Help",
        "base-price": 100
      },
      "relationships": {
        "gig": {
          "data": {
            "type": "gigs",
            "id": "35"
          }
        }
      }
    },
    {
      "id": "35",
      "type": "worker-filters",
      "links": {
        "self": "/api/v1/worker-filters/35"
      },
      "attributes": {
        "filter-query": "{ \"size.h\": { \"$lt\": 15 }, \"size.uom\": \"in\", \"status\": \"D\" }"
      }
    }
  ]
}

Delete a gig

Request

Endpoint

DELETE https://api.cirro.io/v1/gigs/212
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwNjJ9.ncdRTOEnaebDSLOki2QtoVey0zC5i4nSGANXfiyfCup6Krrizlu8v1XZ1GAtvPHmiuC_HTYYQziEXXfsbL43fm-9PxcAgHuN041XgrLvT_bmBgQYWmPPuJdWezJPcohKi8s9Y5zZDFDQeyojVXuuVc6KvzLQHWJ-Mb28-wPKnH3XEWtZ6VQYg7EhU_2j98SuiE8BwDJujFx6lx2hj87vvu_zEiK19U4gDl7mus2555Ifcr0CvCib6wlMBXwpmXxeauImkGAhveUBUrrlrUJ09mHkXYBdoXS7jLrtIJZOmzSBUl2b9Ra5FLH2BeTVSlVi58FJw4f-IsxW9U9nJ_Q3xw

DELETE https://api.cirro.io/v1/gigs/:id

Parameters

Name Description
id required ID of the gig

Response


204 No Content

Get a gig

Request

Endpoint

GET https://api.cirro.io/v1/gigs/184
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwNTN9.REedHEgblBUZlO7sMKun7UwjxAKp4NAI6ifOJR2vL10uJCLwqVhSSTACGZvJbtXCPLhmEb73iMqcwQTgUumtAEGaw101Rns2ciJqolLYusp1ecJBlI3CnZQ4S4-86W3nL0p26JOdhFHPVBLI8dXZELdgpNQ4kExWvzeZGnvECBs-PssGCdJnbg1lEfAEwEzAz7_4Ga-r3cdlZHgbrFGsqmNqNToHMBcYs_BK8cSU7PkyRaifbA9Gw_wBT5kkR5PpWAVYuSuLKMmDoUWfZ_hw2Ir864BATiOxkpXHC9IM-SRf_HR72hB5Rft97G4ew3wKF2SmhCytL0RikAJAJUVnWQ

GET https://api.cirro.io/v1/gigs/:id

Parameters

Name Description
id required ID of the gig

Response

Content-Type: application/vnd.api+json
200 OK
{
  "data": {
    "id": "184",
    "type": "gigs",
    "links": {
      "self": "https://api.cirro.io/api/v1/gigs/184"
    },
    "attributes": {
      "title": "Look to Windward",
      "description": "I believe consistency and orthogonality are tools of design, not the primary goal in design.",
      "url": "http://jaskolski.co/cortney",
      "automatic-invites": false,
      "invitation-mode": "manual",
      "total-seats": 4,
      "archive-at": "2022-07-03T19:17:42.000Z",
      "end-at": "2022-07-03T19:17:42.000Z",
      "archived-at": null,
      "start-at": "2022-06-05T15:26:16.000Z",
      "extra-mile": false,
      "notification-payload": {
      },
      "invitation-multiplier": 1
    },
    "relationships": {
      "gig-tasks": {
        "links": {
          "self": "https://api.cirro.io/api/v1/gigs/184/relationships/gig-tasks",
          "related": "https://api.cirro.io/api/v1/gigs/184/gig-tasks"
        }
      }
    }
  }
}

Update a gig

Request

Endpoint

PATCH https://api.cirro.io/v1/gigs/186
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwNTN9.kVOlYzNqJT63DsngM7rz4V7i5G_ES-Xytou1nD6-oFGZwenzOWHD7U4RrSIjFsgzVt-OkAezUqi5UtCFIksVPk4EKJmVarVQOxlG-56jeR75mG0SDCbWQQbgAhYMUIBMzCFilqumvOELLSlFnGF-zZuofHSrKAPYCiXxJvso-T_OtWooiMIDAwsaG8TCnozoaU1wPu4pXxLAdpE-VSP5vlAOKHNyHRUXd9to4vYhvR8GBMoC8knqD7kp6hTuQ1tjRtpkLmxpRCB9q4B6K685L4GA4E0IP3hnmwfWU-jqyAILILh4ta931xHbfsE8KRM-CMNu71LhQsXzn6iDqJQzuA

PATCH https://api.cirro.io/v1/gigs/:id

Parameters

{"data":{"type":"gigs","attributes":{"title":"Behold the Man","description":"From the viewpoint of what you can do, therefore, languages do differ - but the differences are limited. For example, Python and Ruby provide almost the same power to the programmer.","url":"http://marvin-bashirian.io/blossom.conroy","start-at":"2022-06-20T23:03:41.000Z","end-at":"2022-07-01T06:38:25.000Z","total-seats":1,"automatic-invites":false,"extra-mile":false,"invitation-multiplier":1},"relationships":{},"id":186}}
Name Description
id required ID of the gig
type required MUST be gigs
attributes[title] Title
attributes[description] Description
attributes[url] URL
attributes[start_at] When to start the gig
attributes[end_at] When to end the gig
attributes[total_seats] Number of workers allowed
attributes[automatic_invites] Auto-invite workers
attributes[extra_mile] Report time activities to EPAM extra mile time package
attributes[invitation_multiplier] This multiplier x #open seats left = #invitations sent out each wave
relationships[worker_filter] A filter for workers
relationships[gig_tasks] Gig tasks. At least 1 is needed to start the invitation
relationships[gig_results] Results. If the gig has only 1 task, the gig_task_id will point to it
relationships[gig_time_activities] Time activities

Response

Content-Type: application/vnd.api+json
200 OK
{
  "data": {
    "id": "186",
    "type": "gigs",
    "links": {
      "self": "https://api.cirro.io/api/v1/gigs/186"
    },
    "attributes": {
      "title": "Behold the Man",
      "description": "From the viewpoint of what you can do, therefore, languages do differ - but the differences are limited. For example, Python and Ruby provide almost the same power to the programmer.",
      "url": "http://marvin-bashirian.io/blossom.conroy",
      "automatic-invites": false,
      "invitation-mode": "manual",
      "total-seats": 1,
      "archive-at": "2022-07-01T06:38:25.000Z",
      "end-at": "2022-07-01T06:38:25.000Z",
      "archived-at": null,
      "start-at": "2022-06-20T23:03:41.000Z",
      "extra-mile": false,
      "notification-payload": {
      },
      "invitation-multiplier": 1
    },
    "relationships": {
      "gig-tasks": {
        "links": {
          "self": "https://api.cirro.io/api/v1/gigs/186/relationships/gig-tasks",
          "related": "https://api.cirro.io/api/v1/gigs/186/gig-tasks"
        }
      }
    }
  }
}

Update a gig

Request

Endpoint

PUT https://api.cirro.io/v1/gigs/199
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwNTd9.gM3CFSxYkVHgIXDgh4yzcaQ1aqfRRUcskZFAfP0T0-hXmRfgvU0fwKGnXG96-GcbcmcNWomeURu6DqYKxun6T_77IfsvfgdHdedxCAsAKrU3VIlBuzg75AM8tPmXG9rCEO3Sr7YIkqnjPHaNvjs3PsF_zc-Nlr-Akb-ch1hhOky_FndDa_mpbfatzd3aBkfHhzkT-2SRmxXwm1PvCUvnQ5fkISwX_3Ufva6CcexN79DlfMWEGqBNVecABfLhB_QtxiOwTjTnMYbo9uvXgJnU2zyB9Y_4p6dS_rfxdxeQDUZJaO_1ma-YstLDcThHLZK3GmbN177QcCE7jkOFlecPug

PUT https://api.cirro.io/v1/gigs/:id

Parameters

{"data":{"type":"gigs","attributes":{"title":"Rosemary Sutcliff","description":"Smart people underestimate the ordinarity of ordinary people.","url":"http://streich.co/kim","start-at":"2022-06-26T07:58:47.000Z","end-at":"2022-07-04T17:22:27.000Z","total-seats":5,"automatic-invites":false,"extra-mile":false,"invitation-multiplier":1},"relationships":{},"id":199}}
Name Description
id required ID of the gig
type required MUST be gigs
attributes[title] Title
attributes[description] Description
attributes[url] URL
attributes[start_at] When to start the gig
attributes[end_at] When to end the gig
attributes[total_seats] Number of workers allowed
attributes[automatic_invites] Auto-invite workers
attributes[extra_mile] Report time activities to EPAM extra mile time package
attributes[invitation_multiplier] This multiplier x #open seats left = #invitations sent out each wave
relationships[worker_filter] A filter for workers
relationships[gig_tasks] Gig tasks. At least 1 is needed to start the invitation
relationships[gig_results] Results. If the gig has only 1 task, the gig_task_id will point to it
relationships[gig_time_activities] Time activities

Response

Content-Type: application/vnd.api+json
200 OK
{
  "data": {
    "id": "199",
    "type": "gigs",
    "links": {
      "self": "https://api.cirro.io/api/v1/gigs/199"
    },
    "attributes": {
      "title": "Rosemary Sutcliff",
      "description": "Smart people underestimate the ordinarity of ordinary people.",
      "url": "http://streich.co/kim",
      "automatic-invites": false,
      "invitation-mode": "manual",
      "total-seats": 5,
      "archive-at": "2022-07-04T17:22:27.000Z",
      "end-at": "2022-07-04T17:22:27.000Z",
      "archived-at": null,
      "start-at": "2022-06-26T07:58:47.000Z",
      "extra-mile": false,
      "notification-payload": {
      },
      "invitation-multiplier": 1
    },
    "relationships": {
      "gig-tasks": {
        "links": {
          "self": "https://api.cirro.io/api/v1/gigs/199/relationships/gig-tasks",
          "related": "https://api.cirro.io/api/v1/gigs/199/gig-tasks"
        }
      }
    }
  }
}

if only one gig task existed

Request

Endpoint

POST http://api.cirro.io/v1/bulk/gigs/31/archive
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NDA5OTk0MDB9.jTZJPBFE6upFcLutUE1PvpdSUqOh8EvV75udZYR3pNDM7FcZpMgTt5J5SHBMMtTlligxz888YNacTDx3-ZEbHVj5nZuaiHwewPLKDClhfUNHW7B6n74HVcldoq78Y0O5yUDKyOKhd8xN4UawNxmhqKjfHdSxMFadvr26Fkjm6EVe80fUuOVmdIfOzjktfzWqoGEAGG5gFFAczZBBD2ghVfgGFND_YcwiKkCPENHD0Lbqcr_-W3XSgNmoL-oHUbVzy7-pPt6E0g5bptTa3JJ_VSBkmanWTg922YRCo5oGQyFP9VG8HcS752RSYSvbC-axT8Q7TwILCzKeplmbNrIz1A

POST http://api.cirro.io/v1/bulk/gigs/:gig_id/archive

Parameters

{"data":{"relationships":{"gig-results":[{"relationships":{"app-worker":{"data":{"id":47}}},"title":"The Green Mile","description":"All right, Mr. DeMille, I'm ready for my closeup.","cost-center-key":"123456","quantity":2},{"relationships":{"app-worker":{"data":{"id":48}}},"title":"The Green Mile","description":"Frankly, my dear, I don’t give a damn.","cost-center-key":"123456","quantity":2}],"gig-time-activities":[{"relationships":{"app-worker":{"data":{"id":47}}},"description":"What we've got here is failure to communicate.","date":"2022-01-01T01:00:00.000Z","duration-in-ms":360000},{"relationships":{"app-worker":{"data":{"id":48}}},"description":"Toto, I've got a feeling we're not in Kansas anymore.","date":"2022-01-01T01:00:00.000Z","duration-in-ms":360000}]}}}
Name Description
relationships[gig-results] Create multiple gig results for the given gig. If the given gig has only 1 gig task, the gig_task_id will be automatically set to this task. Example: [{ relationships: { app-worker: { data: { id: 1 } } }, title: 'Completed Task1', description: 'Thank you for your work!', quantity: 2, multiplier: 2.5 }, ...]
relationships[gig-time-activities] Create multiple gig time activities for the given gig. Example: [{ relationships: { app-worker: { data: { id: 1 } } }, description: 'Complete work for gig #1', date: '2020-09-28 11:32:46 UTC', duration_in_ms: 360000 }, ...]

Response

Content-Type: application/json; charset=utf-8
201 Created
{
  "data": {
    "id": "31",
    "type": "gigs",
    "links": {
      "self": "/api/v1/gigs/31"
    },
    "attributes": {
      "title": "A Scanner Darkly",
      "description": "I believe consistency and orthogonality are tools of design, not the primary goal in design.",
      "url": "http://satterfield.net/stan",
      "automatic-invites": false,
      "invitation-mode": "manual",
      "total-seats": 1,
      "archive-at": "2022-01-01T01:00:00.000Z",
      "end-at": "2022-01-01T01:00:00.000Z",
      "archived-at": null,
      "start-at": "2022-01-21T06:15:52.000Z",
      "extra-mile": false,
      "notification-payload": {
      },
      "invitation-multiplier": 1
    },
    "relationships": {
      "gig-tasks": {
        "links": {
          "self": "/api/v1/gigs/31/relationships/gig-tasks",
          "related": "/api/v1/gigs/31/gig-tasks"
        }
      },
      "gig-results": {
        "data": [
          {
            "type": "gig-results",
            "id": "5"
          },
          {
            "type": "gig-results",
            "id": "6"
          }
        ]
      },
      "gig-time-activities": {
        "data": [
          {
            "type": "gig-time-activities",
            "id": "5"
          },
          {
            "type": "gig-time-activities",
            "id": "6"
          }
        ]
      }
    }
  },
  "included": [
    {
      "id": "5",
      "type": "gig-results",
      "links": {
        "self": "/api/v1/gig-results/5"
      },
      "attributes": {
        "title": "The Green Mile",
        "description": "All right, Mr. DeMille, I'm ready for my closeup.",
        "quantity": 2,
        "multiplier": "1.0",
        "external-customer-id": "123456",
        "delivery-date": "2022-01-01",
        "cost-center-key": "123456",
        "cost-center-data": null
      }
    },
    {
      "id": "6",
      "type": "gig-results",
      "links": {
        "self": "/api/v1/gig-results/6"
      },
      "attributes": {
        "title": "The Green Mile",
        "description": "Frankly, my dear, I don’t give a damn.",
        "quantity": 2,
        "multiplier": "1.0",
        "external-customer-id": "123456",
        "delivery-date": "2022-01-01",
        "cost-center-key": "123456",
        "cost-center-data": null
      }
    },
    {
      "id": "5",
      "type": "gig-time-activities",
      "links": {
        "self": "/api/v1/gig-time-activities/5"
      },
      "attributes": {
        "description": "What we've got here is failure to communicate.",
        "duration-in-ms": 360000,
        "date": "2022-01-01"
      },
      "relationships": {
        "gig": {
          "data": {
            "type": "gigs",
            "id": "31"
          }
        }
      }
    },
    {
      "id": "6",
      "type": "gig-time-activities",
      "links": {
        "self": "/api/v1/gig-time-activities/6"
      },
      "attributes": {
        "description": "Toto, I've got a feeling we're not in Kansas anymore.",
        "duration-in-ms": 360000,
        "date": "2022-01-01"
      },
      "relationships": {
        "gig": {
          "data": {
            "type": "gigs",
            "id": "31"
          }
        }
      }
    }
  ]
}

NotificationsBroadcasts

create notifications-broadcast

Request

Endpoint

POST http://api.cirro.io/v1/notifications-broadcasts
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwNjN9.HHi4wXpCYb7PCZb_4PVgTfrwjLskzTmBN2j1ibm8d5yFqpIpnBxJGe1V6ReplZOfAFrcGd2BQ98Fg_Fw6o4pwr262JWRmFK2jRSM1_YvdaDNCIpRv3v2zQgQH5y_mp4T56WhiDv2Fbp44yRmDXs7A0WdLTzmNpIK2FNn107OalafV2QWcLZeSWFaHztxM3VOU-1lI5lfUbbJCYTtdEuuX8azLTWNv748UpcDRFvR5FIMTSCSJelKD8pUQS-T8_0O-B5rQ2COvw8_7N_GafqrjK50fB6paBl-aUrcTZdiV_ZHcvfOBkwrlZNtHypr7us3scqiLyTvcrBcUtDEiXpknQ

POST http://api.cirro.io/v1/notifications-broadcasts

Parameters

{"data":{"type":"notifications-broadcasts","attributes":{"payload":{"key":"value"}},"relationships":{"channel":{"data":{"type":"notifications-channels","id":5}},"worker-filter":{"data":{"type":"worker-filters","id":240}}}}}
Name Description
type required Should always be set to notifications-broadcasts.
attributes[payload] required Payload of the notifications broadcast to pass to the channel templates in order to render them
attributes[app-user-ids] One of the 3 ways to specify the recipient(s) of the notification.
attributes[app-worker-ids] One of the 3 ways to specify the recipient(s) of the notification.
relationships[channel] required Associate the broadcast to a notifications channel
relationships[worker-filter] One of the 3 ways to specify the recipient(s) of the notification.

Response

Content-Type: application/vnd.api+json
201 Created
{
  "data": {
    "id": "1",
    "type": "notifications-broadcasts",
    "links": {
      "self": "http://api.cirro.io/api/v1/notifications-broadcasts/1"
    },
    "attributes": {
      "payload": {
        "key": "value"
      },
      "app-user-ids": [

      ],
      "app-worker-ids": [

      ]
    }
  }
}

create notifications-broadcast

Request

Endpoint

POST http://api.cirro.io/v1/notifications-broadcasts
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwNjN9.MTpc5Se_Dw6uQxXg5i1A0IiCL2NCgVdoJCqJdZd_spWAGhJtIgBWqdF6DBjc6fpCJrevTnRCdxHFGX7nKyMzcYh6oQKbpsak52vTvedc4HgZhLzIGHsKdPyBrc7Etbr-5BI357cW7AYC1BLIYRRh8qG_IeP2FSBDweW1cRBzlrbT0CZV6NNZElp8tYUwhzCBtXwaLQ0NdOCf58SAcC_JZOvoXuuMor4psQ3CCx_EtAEDjZk-K_ENTWuLXl4SJALpF7gwCrSgeMnno40Us4VzcfCg7XgClBSPzPQPGz8DCuqD25LBJFsEq9N-5-B6R9pdh_O29cg2Iwzl3Ur-a56Tbg

POST http://api.cirro.io/v1/notifications-broadcasts

Parameters

{"data":{"type":"notifications-broadcasts","attributes":{"payload":{"key":"value"},"app-user-ids":[294,295]},"relationships":{"channel":{"data":{"type":"notifications-channels","id":6}}}}}
Name Description
type required Should always be set to notifications-broadcasts.
attributes[payload] required Payload of the notifications broadcast to pass to the channel templates in order to render them
attributes[app-user-ids] One of the 3 ways to specify the recipient(s) of the notification.
attributes[app-worker-ids] One of the 3 ways to specify the recipient(s) of the notification.
relationships[channel] required Associate the broadcast to a notifications channel
relationships[worker-filter] One of the 3 ways to specify the recipient(s) of the notification.

Response

Content-Type: application/vnd.api+json
201 Created
{
  "data": {
    "id": "2",
    "type": "notifications-broadcasts",
    "links": {
      "self": "http://api.cirro.io/api/v1/notifications-broadcasts/2"
    },
    "attributes": {
      "payload": {
        "key": "value"
      },
      "app-user-ids": [
        294,
        295
      ],
      "app-worker-ids": [

      ]
    }
  }
}

create notifications-broadcast

Request

Endpoint

POST http://api.cirro.io/v1/notifications-broadcasts
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwNjN9.zURC_XItkW_LDFVfFs2RtDJ80ri0NIUda-PAK_IJCVKeaxzbjT54YRToQ8dABs6RAzDEUan9vbefwd70sljH-K3aOxdkuiWhBWIwKxL2yAtryA9-P2yDvFme0zuz-X3lCTfplzCsPWBlr3mNx9NVFUD5mYQ0p2PVqH81J0ehsEsKKwVEsS22dp6DRoxOHeJXqZ8CIV0GDkJB0rr6Kn8cpCrIyOux2ji_q-_KiL-SSyqIf6MBZeedFXsuFH8Q_s_dtqzmHEwT6SPMILfmlHjgPOfw_H21HwqAKWR27snQc6IMc1gJkyyTrqNFRu5AIygBDRFYzU6BqCw-HEREGrUSqw

POST http://api.cirro.io/v1/notifications-broadcasts

Parameters

{"data":{"type":"notifications-broadcasts","attributes":{"payload":[{"296":{"key":296}},{"297":{"key":297}}],"app-user-ids":[296,297]},"relationships":{"channel":{"data":{"type":"notifications-channels","id":7}}}}}
Name Description
type required Should always be set to notifications-broadcasts.
attributes[payload] required Payload of the notifications broadcast to pass to the channel templates in order to render them
attributes[app-user-ids] One of the 3 ways to specify the recipient(s) of the notification.
attributes[app-worker-ids] One of the 3 ways to specify the recipient(s) of the notification.
relationships[channel] required Associate the broadcast to a notifications channel
relationships[worker-filter] One of the 3 ways to specify the recipient(s) of the notification.

Response

Content-Type: application/vnd.api+json
201 Created
{
  "data": {
    "id": "3",
    "type": "notifications-broadcasts",
    "links": {
      "self": "http://api.cirro.io/api/v1/notifications-broadcasts/3"
    },
    "attributes": {
      "payload": [
        {
          "296": {
            "key": 296
          }
        },
        {
          "297": {
            "key": 297
          }
        }
      ],
      "app-user-ids": [
        296,
        297
      ],
      "app-worker-ids": [

      ]
    }
  }
}

create notifications-broadcast

Request

Endpoint

POST http://api.cirro.io/v1/notifications-broadcasts
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwNjN9.Neyzc4CX3wYOgYiHZ7L3uxC6sygcXTIgyIPo4w_n8Gnvv_WVkJV4Y8lK0a79Q3rOx1T-J1PNqOrj0sW766Qy0n4T5xbnbEEk-s-wexo52-1bEhmAwsGgLhEEdMgYg5BK43PwwouUOD4yKYkZCJdg2hM0K7-PT_Q3Sut04Zy7XBi4veyIWvf_T1ErEgaB9QeZKENWZhsbst51JgAFP8EvbWp9Os6dV_V8JRxoADIUu1A9FBjn1FXKEO09tFJPX5THF4_SrQnLprjoMH6fy1b4bZh2pxk-RdVD1AcRT8ZW8E42NR-eTNB-apMBuf7vWngK6BGP0WVg0DEAvHxjr8GjFw

POST http://api.cirro.io/v1/notifications-broadcasts

Parameters

{"data":{"type":"notifications-broadcasts","attributes":{"payload":{"key":"value"},"app-worker-ids":[201,202]},"relationships":{"channel":{"data":{"type":"notifications-channels","id":8}}}}}
Name Description
type required Should always be set to notifications-broadcasts.
attributes[payload] required Payload of the notifications broadcast to pass to the channel templates in order to render them
attributes[app-user-ids] One of the 3 ways to specify the recipient(s) of the notification.
attributes[app-worker-ids] One of the 3 ways to specify the recipient(s) of the notification.
relationships[channel] required Associate the broadcast to a notifications channel
relationships[worker-filter] One of the 3 ways to specify the recipient(s) of the notification.

Response

Content-Type: application/vnd.api+json
201 Created
{
  "data": {
    "id": "4",
    "type": "notifications-broadcasts",
    "links": {
      "self": "http://api.cirro.io/api/v1/notifications-broadcasts/4"
    },
    "attributes": {
      "payload": {
        "key": "value"
      },
      "app-user-ids": [

      ],
      "app-worker-ids": [
        201,
        202
      ]
    }
  }
}

create notifications-broadcast

Request

Endpoint

POST http://api.cirro.io/v1/notifications-broadcasts
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwNjR9.hc7K0VAmPoSn4W1Pw_9ccJmwbskhiJFDvJbiIrfH2TXRNpG2Jkj2IUaDoE4q0Fb10G-I3EqThC0_et4H_l_OIl-8-ZeAXeIDS22d_zN9XdSACv4g85jiWXTvhbFiOPWBX_Q5ufMgFeBNiBKpJ7_qCma9IgPYfpEMWn45DP1yMukKUlSl0NOTg6ePoBTtfHvADCEBXF8IQiPKJuYh3-itA0oT_nPQ0kQz0nI6brf0yxOJmyItzBHsGPqLjpBkqv53iuPTFCWyJ3Z2PAajkygsPWABn_9bAcrGMsWV3l64O3mr4X7_51yFB0yHvuWLhns-utCxxRatI1kVd4z27Bdq6Q

POST http://api.cirro.io/v1/notifications-broadcasts

Parameters

{"data":{"type":"notifications-broadcasts","attributes":{"payload":[{"203":{"key":203}},{"204":{"key":204}}],"app-worker-ids":[203,204]},"relationships":{"channel":{"data":{"type":"notifications-channels","id":9}}}}}
Name Description
type required Should always be set to notifications-broadcasts.
attributes[payload] required Payload of the notifications broadcast to pass to the channel templates in order to render them
attributes[app-user-ids] One of the 3 ways to specify the recipient(s) of the notification.
attributes[app-worker-ids] One of the 3 ways to specify the recipient(s) of the notification.
relationships[channel] required Associate the broadcast to a notifications channel
relationships[worker-filter] One of the 3 ways to specify the recipient(s) of the notification.

Response

Content-Type: application/vnd.api+json
201 Created
{
  "data": {
    "id": "5",
    "type": "notifications-broadcasts",
    "links": {
      "self": "http://api.cirro.io/api/v1/notifications-broadcasts/5"
    },
    "attributes": {
      "payload": [
        {
          "203": {
            "key": 203
          }
        },
        {
          "204": {
            "key": 204
          }
        }
      ],
      "app-user-ids": [

      ],
      "app-worker-ids": [
        203,
        204
      ]
    }
  }
}

NotificationsChannels

Create notifications-channel

Request

Endpoint

POST http://api.cirro.io/v1/notifications-channels
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwNjR9.g4uoGz8FVhmW1Wi7yd-rv8MxduMmFRp69-Z5vGvu-KvZgj4mBNpLxhp_sKFY706udRgcUlncCbmV6JEflMLzac6Mf7L_V-lnAp4nutig6kttV9n20uZgysYDYkK0_YJmBa35iZkEg9hQxI9MuFMHbmesvOgwLL4qzG0u94o5HqQ9OtWLQB7uXOxidIwfa7yfHUuvv93ygERMCXpD-bJVyAJ7heG5IOsqbskcft72Seu55pPBFDqcUJAW1c6BOVrCYIMvNIXWoBKJdqAJi7-OQmjkv7E-K7k1gGJ-rwH3JMvAu2sVgWbFqsfqYrgYV80JEhIsHCCkWIFTctalkPe_xQ

POST http://api.cirro.io/v1/notifications-channels

Parameters

{"data":{"type":"notifications-channels","attributes":{"name":"some_notifications_channel"}}}
Name Description
type required Should always be set to notifications-channels.
attributes[name] required Name of the notifications channel. Must be "snakecase" (lowercase letters and underscores only)
attributes[use-default-email-layout] Flag to set whether email notifications sent for this channel use Cirro's default email layout, or if the Space will encode both the layout and content in the appropriate NotificationsTemplate
attributes[email-preference] Default email preference for the notifications channel. Must be one of ["immediately", "digest_hourly", "never"]

Response

Content-Type: application/vnd.api+json
201 Created
{
  "data": {
    "id": "13",
    "type": "notifications-channels",
    "attributes": {
      "name": "some_notifications_channel",
      "use-default-email-layout": true,
      "email-preference": "immediately"
    }
  }
}

Delete notifications-channel

Request

Endpoint

DELETE http://api.cirro.io/v1/notifications-channels/18
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwNjV9.Zt4hB_zqJfYlhrjqalMChwDm3Mvm5nkK7PnmY7y4fF9yFHtYJR_LYiDGU6OP9GGWn0qTsuhzN08wfUDY1qwcmbnPcu4KLKAyV31n347czVmstk0fOtUw2GFD7brotTSzz5pFgxi9lS1FsVl1E6YZP3aJ477wyjcgtuxNgbD3gECgRPW8ixEJKm_Lod6jZdT_ef0gK4wH1f4E8MYciswjNZ1-nVZslyhLVUbpLIRwWXRPWFUni6ktyQBBVjOjPHJjlXjTHG4Owb9snDe7IE3kNYGvGSWbTDBg_PSKvcpSfT3w39iK9qB-01dCWy5PG6aqLBlUCrmkDmrF_7QjcM8cMA

DELETE http://api.cirro.io/v1/notifications-channels/:id

Parameters

{"data":{"type":"notifications-channels","id":"18"}}
Name Description
id required ID of the notifications channel to be deleted.
type required Should always be set to notifications-channels.

Response


204 No Content

Get a notifications-channels

Request

Endpoint

GET http://api.cirro.io/v1/notifications-channels/14
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwNjR9.QCESb-0p9cKTdYfb9ZQA8LDsoDwCPZ_pRfz_AX-PtfrGdCvrCmnwTOPrQX9iqO7FJHvWt0UbedHWu_7r3TxWPkfQLcc_7vBIqtqIgL_1of6HDCeF6peIHuliOy40H4ysVTAlZYmZyP-ShuQ5IMye9qLGT1f6V0--XMlGL0eGbYh0fqtxz1Sj7NSpkal7wnzSG1qREI8m7EC-l0PZdFJf45lBrUbW_Go5GCXeKwmULR3V3upHFRQdV6uWWbvK_N0bBaMkQYiH56SidZexCqpR8dmdJAYMDQIfYzZvkNhHXsyH2rIO_VGq9xsPZH1aj1xCauTg6nJHKFirUUzapH2iHw

GET http://api.cirro.io/v1/notifications-channels/:id

Parameters

Name Description
id required ID of the notifications channel.

Response

Content-Type: application/vnd.api+json
200 OK
{
  "data": {
    "id": "14",
    "type": "notifications-channels",
    "attributes": {
      "name": "factory_notifications_channel",
      "use-default-email-layout": true,
      "email-preference": "immediately"
    }
  }
}

Get all notifications-channels for app making the call

Request

Endpoint

GET http://api.cirro.io/v1/notifications-channels
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwNjR9.QLDjfzDKXJURu7FAhbDpHnfLGdInETCOoGniJmKR4a3ht3qtA9oy-gLesnuAQ-dATLveF-9yj0WmtpXioc9Ov-tRfKMiv0FXCE-IleYTz9r8pS0-BzR24NAoPTxY0DYSk9bww_Diybl2tqoN5Kkg3fGeH4W96Rqm8AoN6bL66K2QnPsBXXCBxlnKVU9vok1s0cZE57STkaIe627dBUG0kvgFLTatPf7VNpnTrczzka7ZAlPKQswtRP1iNFLmpx-c1FYlQkafSpS8IqHbxEcNZ2btjh1rc4VsR5wKgC9Qc6bMql1nL2bNs26S5Zy378716KyV39qGq-upVq-6uFQzYA

GET http://api.cirro.io/v1/notifications-channels

Parameters

None known.

Response

Content-Type: application/vnd.api+json
200 OK
{
  "data": [
    {
      "id": "2",
      "type": "notifications-channels",
      "attributes": {
        "name": "new_gig_invitation",
        "use-default-email-layout": true,
        "email-preference": "immediately"
      }
    },
    {
      "id": "12",
      "type": "notifications-channels",
      "attributes": {
        "name": "factory_notifications_channel",
        "use-default-email-layout": true,
        "email-preference": "immediately"
      }
    }
  ]
}

Update notifications-channel

Request

Endpoint

PATCH http://api.cirro.io/v1/notifications-channels/16
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwNjV9.rHcm38MAVKp25Dpq4k7cdLzs0NXgJV8c5pN5zThJx0vCTzrWggYy7E-RS6qLF4GxOfoWHxNnwvfzIHYZIxlX9Wm1zb6Mej9589H0YIbLqdVNMuv3rWJ2wmGXgVcG2T2zwQC-E2p_jMJQucmPToLBuU_WT5ocdcpaXD8szlTu04TOoVTb2Yeptr9nttvhGl5vIda3QlMz3-h7bIiAi9TGK4phxO2bk0svZYOK3U3J9HYr51016F2G0HrVj8Z6L9H0v3TANWDX9bIt-3EtTL73n55LP-QTUH8DIkWkB2ge8Wbnajv4gNna6KI8yszIzXZ1n6gHZYa3TYi0VdvVYxhmwA

PATCH http://api.cirro.io/v1/notifications-channels/:id

Parameters

{"data":{"type":"notifications-channels","attributes":{"name":"new_channel_name"},"id":"16"}}
Name Description
id required ID of the notifications channel to be updated.
type required Should always be set to notifications-channels.
attributes[name] Name of the notifications channel. Must be "snakecase" (lowercase letters and underscores only)
attributes[use-default-email-layout] Flag to set whether email notifications sent for this channel use Cirro's default email layout, or if the Space will encode both the layout and content in the appropriate NotificationsTemplate

Response

Content-Type: application/vnd.api+json
200 OK
{
  "data": {
    "id": "16",
    "type": "notifications-channels",
    "attributes": {
      "name": "new_channel_name",
      "use-default-email-layout": true,
      "email-preference": "immediately"
    }
  }
}

NotificationsTemplates

Create notifications-template

Request

Endpoint

POST http://api.cirro.io/v1/notifications-templates
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwNjZ9.rghMgV1IB4RP8jGhXD6uNKPhyMqXshDoJF5mtHu1fSQwRNjv7EiN_0862nFfJ4aHGEbUu8O6cwcEj7FrupREoCy7OqD4KEFm9IfX0gFOW9wDHruspaaL4E6mlsRXIqq2FqKGDY9OTdA8jw-2o_TEGm2r8Im9r0vc1Ck7w6EeF1FhkJn3LkZJj1ZLpi6ODYwJB7GM854hSjHWsLBeDhscVGyaYjAWSW5U8I_3GpMlFqnZeyQ_szAWJOuoZ44wCMFMgJt0U7irJuqy5Mg5q79Prj2FsrdNbG4KCt0avkUG3wtJvBRnbPYIbjPauwB8-ddGh5V8yb4wEVi0wvP0bs0o8w

POST http://api.cirro.io/v1/notifications-templates

Parameters

{"data":{"type":"notifications-templates","attributes":{"subject":"some notifications template subject","body":"the body...","deliver-by":"in_app","format":"text","kind":"standalone"},"relationships":{"channel":{"data":{"type":"notifications-channels","id":21}}}}}
Name Description
type required Should always be set to notifications-templates.
attributes[subject] required Subject of the notifications template
attributes[body] required Body of the notifications template
attributes[deliver-by] required Delivery mechanism of the notifications template. Must be one of ["email", "in_app"]
attributes[format] required Format of the notifications template. Must be one of ["text", "html"]
attributes[kind] required kind of the notifications template. Must be one of ["standalone", "digest"]
relationships[channel] required Associate the template to a notifications channel

Response

Content-Type: application/vnd.api+json
201 Created
{
  "data": {
    "id": "18",
    "type": "notifications-templates",
    "links": {
      "self": "http://api.cirro.io/api/v1/notifications-templates/18"
    },
    "attributes": {
      "subject": "some notifications template subject",
      "body": "the body...",
      "deliver-by": "in_app",
      "format": "text",
      "kind": "standalone"
    }
  }
}

Delete notifications-template

Request

Endpoint

DELETE http://api.cirro.io/v1/notifications-templates/23
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwNjZ9.zmyrZI8fgO8uDeEksS9OMm16dNDaBVO4HzaJ9nqCDATwNcedYi9-hoIJAdNX01Pi8ApFVHwB3DwItf68AJCytcuoeVvURgTw8zEqVSRN_2PaUBPhhzhM09GN0TE7fyWFB2QrbsED9EhZF4LQiE03YN23nEvTFH2eyQBLegzgO6Y6E6CyGukleKBghpTY9WB9Or-KNsbebAmwGx7kqrICtfaDl41DZBGrJX8H2mhZ5lxQrDx6n-EetQZ2BeTPJW4TTsahPGJtzvVNBEXbCP-yq7OFfV6Bvh7gSiOH8PaBwEcjUZ5Z6W12vNyBRhspZQblVzD-LR4QySFFQb2NmbVifA

DELETE http://api.cirro.io/v1/notifications-templates/:id

Parameters

{"data":{"type":"notifications-templates","id":"23"}}
Name Description
id required ID of the notifications template to be deleted.
type required Should always be set to notifications-templates.

Response


204 No Content

Get a notifications-templates

Request

Endpoint

GET http://api.cirro.io/v1/notifications-templates/19
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwNjZ9.KWcAVx8_m0p8HPgV0aSm0Rr77YNyXTNnRIe0tlx8NaLPNAYojuejKqXHtGHg9VJNsi6OX5-odwq11y59JCH1TWSD7I4pZmsq3SvxfiVDCVwxOHxTFuc0_j4J4IzKY6PmEF07futjlg6QBKm-duiL1BpNRxemHnxVvv6VEIOKTMa6gIHDAXUANKjCLM5hp5HrpMz0KiTQD7YeAFl02085VPDcuR31VVtkPnekqVJItekb50_5jbseGBo_1mkuXzQWf0J-gESHKcuNaHwAdkPd_cWlkMq88yLbOsV1IOenmZ1NzV_327qoeid7OCIZXrCgK34L8VVT1PcsdK8bOwuGTQ

GET http://api.cirro.io/v1/notifications-templates/:id

Parameters

Name Description
id required ID of the notifications template.

Response

Content-Type: application/vnd.api+json
200 OK
{
  "data": {
    "id": "19",
    "type": "notifications-templates",
    "links": {
      "self": "http://api.cirro.io/api/v1/notifications-templates/19"
    },
    "attributes": {
      "subject": "factory template subject",
      "body": "factory template body with %{cirro_notice}",
      "deliver-by": "in_app",
      "format": "text",
      "kind": "standalone"
    }
  }
}

Get all notifications-templates for app making the call

Request

Endpoint

GET http://api.cirro.io/v1/notifications-templates
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwNjV9.osDaP8_y1vpknmfeD2svkWMUJkRDgmWupLDye68vgKbjoqf8Ffk_MZUDYMYXP7Ke6Tx3FRGDZU6cx9HP2hiIOfDSHPLjyNMnEa3GzL0u6ngL1V4QCFOBu6CLddd9-wZ8yuOmtgMOHWRNe6FkVMJBujIYIUnW8KT_fM35MlPCcbV36taCx-Hec9Vol_oqgNUjEeoKRX1cl8fkOjYAjHC0Cfm8KA0emBP9TCe3J0OEd41jqvvGUtM9-hVe9ybPXDe9758MtybSeCC-8D1H5yXBcqexeErWbaO5uTgL7yYBhUlyLivMLD2kQqWXHmmY1v56TpGiGggPz18yotS5Ytqi4g

GET http://api.cirro.io/v1/notifications-templates

Parameters

None known.

Response

Content-Type: application/vnd.api+json
200 OK
{
  "data": [
    {
      "id": "5",
      "type": "notifications-templates",
      "links": {
        "self": "http://api.cirro.io/api/v1/notifications-templates/5"
      },
      "attributes": {
        "subject": "[Cirro] Invitation - %{gig_app_name} - %{gig_title}",
        "body": "<p>Hello %{recipient_first_name},</p>\n<p>There is a new gig matching your profile.</p>\n<p style=\"line-height: 40px\">Click on <a href=\"%{gig_url}\">this link</a> to access all details</p>\n",
        "deliver-by": "email",
        "format": "html",
        "kind": "standalone"
      }
    },
    {
      "id": "6",
      "type": "notifications-templates",
      "links": {
        "self": "http://api.cirro.io/api/v1/notifications-templates/6"
      },
      "attributes": {
        "subject": "[Cirro] Invitation - %{digest_count} gig%{pluralize digest_count \"\" \"s\"} \\\n          %{pluralize digest_count \"is\" \"are\"} available for you on %{app_name}",
        "body": "<p>Hello %{recipient_first_name},</p>\n<h1>%{digest_count} new Gig%{pluralize digest_count \"\" \"s\"}</h1>\n<p>%{pluralize digest_count \"is\" \"are\"} available on your dashboard.</p>\n<p style=\"line-height: 40px\"><a class=\"btn-primary\" href=\"%{app_url}\">Show me %{pluralize digest_count \"this\" \"all\"} gig%{pluralize digest_count \"\" \"s\"}</a></p>\n",
        "deliver-by": "email",
        "format": "html",
        "kind": "digest"
      }
    },
    {
      "id": "7",
      "type": "notifications-templates",
      "links": {
        "self": "http://api.cirro.io/api/v1/notifications-templates/7"
      },
      "attributes": {
        "subject": "[Cirro] Invitation - %{gig_app_name} - %{gig_title}",
        "body": "Hello %{recipient_first_name},\n\nThere is a new gig matching your profile.\n\nClick on link below to access all details:\n\n%{gig_url}\n",
        "deliver-by": "email",
        "format": "text",
        "kind": "standalone"
      }
    },
    {
      "id": "8",
      "type": "notifications-templates",
      "links": {
        "self": "http://api.cirro.io/api/v1/notifications-templates/8"
      },
      "attributes": {
        "subject": "[Cirro] Invitation - %{digest_count} gig%{pluralize digest_count \"\" \"s\"} \\\n          %{pluralize digest_count \"is\" \"are\"} available for you on %{app_name}",
        "body": "Hello %{recipient_first_name},\n\n%{digest_count} new gig%{pluralize digest_count \"\" \"s\"} %{pluralize digest_count \"is\" \"are\"} available on your dashboard.\n\nClick on link below to access %{pluralize digest_count \"this\" \"all\"} gig%{pluralize digest_count \"\" \"s\"}:\n\n%{app_url}\n",
        "deliver-by": "email",
        "format": "text",
        "kind": "digest"
      }
    },
    {
      "id": "17",
      "type": "notifications-templates",
      "links": {
        "self": "http://api.cirro.io/api/v1/notifications-templates/17"
      },
      "attributes": {
        "subject": "factory template subject",
        "body": "factory template body with %{cirro_notice}",
        "deliver-by": "in_app",
        "format": "text",
        "kind": "standalone"
      }
    }
  ]
}

Update notifications-template

Request

Endpoint

PATCH http://api.cirro.io/v1/notifications-templates/21
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwNjZ9.HQQ3gTx7ynsis50onkVVINsKxjwf36qhLuWXgxzouAhvi10Xtc1GnswWHi4FD5LlmHy-NM-Wx7HyOBZTkYJOBciAATW2bI6C9FEoMt3D70anM7ZSyRXsIPCvLRsU7Jw_OZCwaLxxIhNATUpAJqVhbfWPLsHjcYkBnDf29Hffu1SfbpTl23FmcxWtxOIMDFcdZ8Ge0jnF55qbNLcQAAtk6yrSGFWVXlnXwZNdxq01-A0tBBGi1BsIvSx6XrROT8bL37sglmJLYLQmchxEN8aOdMVPupEOl6jWDuoiaoeRDIIfbNpCyFRN84kqR1gZEytk-DHocBwaVzm76kiTPg76vw

PATCH http://api.cirro.io/v1/notifications-templates/:id

Parameters

{"data":{"type":"notifications-templates","attributes":{"subject":"new notifications template subject","body":"new body...","deliver-by":"in_app","format":"text"},"relationships":{"channel":{"data":{"type":"notifications-channels","id":25}}},"id":"21"}}
Name Description
id required ID of the notifications template to be updated.
type required Should always be set to notifications-templates.
attributes[subject] required Subject of the notifications template
attributes[body] required Body of the notifications template
attributes[deliver-by] required Delivery mechanism of the notifications template. Must be one of ["email", "in_app"]
attributes[format] required Format of the notifications template. Must be one of ["text", "html"]
relationships[channel] required Associate the template to a notifications channel

Response

Content-Type: application/vnd.api+json
200 OK
{
  "data": {
    "id": "21",
    "type": "notifications-templates",
    "links": {
      "self": "http://api.cirro.io/api/v1/notifications-templates/21"
    },
    "attributes": {
      "subject": "new notifications template subject",
      "body": "new body...",
      "deliver-by": "in_app",
      "format": "text",
      "kind": "standalone"
    }
  }
}

Payouts

Create a payout

Request

Endpoint

POST https://api.cirro.io/v1/payouts
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwNjd9.m-EKLWj-0TPxm7z_7l8DktR2frwdBMck1gv_GndJqaq0te-jyFsh2L2LJZ2IkQP4MbSWJJtRAgoOeagj3Uy8DPgTRUeJ0-QVXVj6C3lD4GFHV_aRm4ENCPVWhtACr2AkE_J7I-VroCjllYb1BeKk8TxMzA4pf-8tP_1yn7r-qXwVekOy4Pqsh1At3YTNfPipW99SKo4dABussCzL7GzA0_zQM-MVkW0fhJ4chaG3YwcTzAw5_UktLTeWeDiPk66bwclaloI0kjyP0127BSznpzuD_b9UrEh6RZJZFbyqrnkAVlwJz6d8BrNxnoHuXaQgBups0meOC9rCf6x62vtDlQ

POST https://api.cirro.io/v1/payouts

Parameters

{"data":{"type":"payouts","attributes":{"amount":1000,"title":"The Golden Bowl","description":"Language designers want to design the perfect language. They want to be able to say, 'My language is perfect. It can do everything.' But it's just plain impossible to design a perfect language, because there are two ways to look at a language. One way is by looking at what can be done with that language. The other is by looking at how we feel using that language-how we feel while programming.","billing-date":"2022-06-05"},"relationships":{"app-worker":{"data":{"type":"app-workers","id":"205"}},"reference":{"data":{"type":"gigs","id":"217"}}}}}
Name Description
type required MUST be payouts
attributes[amount] required Payment amount (in cents)
attributes[title] required Annotation title
attributes[description] required Annotation
attributes[billing_date] required Billing date
attributes[cost_center_key] required A EPAM project code for book keeping in finance. It is required if cost_center_data is not given.
attributes[cost_center_data] required A json string containing customer details: customer_id, company, legal_entity and inhouse. It is required if cost_center_key is not given.
relationships[app_worker] required The worker to be rewarded
relationships[reference] Payment reference

Response

Content-Type: application/vnd.api+json
201 Created
{
  "data": {
    "id": "1",
    "type": "payouts",
    "links": {
      "self": "https://api.cirro.io/api/v1/payouts/1"
    },
    "attributes": {
      "amount": 1000,
      "title": "The Golden Bowl",
      "description": "Language designers want to design the perfect language. They want to be able to say, 'My language is perfect. It can do everything.' But it's just plain impossible to design a perfect language, because there are two ways to look at a language. One way is by looking at what can be done with that language. The other is by looking at how we feel using that language-how we feel while programming.",
      "billing-date": "2022-06-05",
      "external-customer-id": "EPM-CRWD",
      "cost-center-key": "EPM-CRWD",
      "cost-center-data": null
    },
    "relationships": {
      "app-worker": {
        "data": {
          "type": "app-workers",
          "id": "205"
        }
      },
      "reference": {
        "data": {
          "type": "gigs",
          "id": "217"
        }
      }
    }
  }
}

Delete a payout

Request

Endpoint

DELETE https://api.cirro.io/v1/payouts/10
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby11eC1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwNjl9.sEe2uRWCQrXaOk9nIBl4HfIqX9bpAuz9mB30k50e1a7fNZKbeNSdrXKuDh4HxMzk-JBbI5eJh-jDUEFROdGfsNg-Hovg6Sjh_aP2q1m1LV3E9lqnbqD50tAHXDVVT4X6VVGj4BVJYUr-34mjiOKBIW26BPm4E9D3JapssgoRomzUM3xPnVDKFKZ_NsYijg0qyJbpeJ8dKveA5J3SLRZDWdSjolaWyyIuD0bCHlFG9Q53bFPsMXGlGibTFH767MgrINFegmyA_e_tblNxeVCcMRzDdJKT1iW7G7ndXh73wpCHRegD6_3kzfk1ODPtpqQxLF40odt5Ztq7tJwyk0UcAQ

DELETE https://api.cirro.io/v1/payouts/:id

Parameters

Name Description
id required ID of the payout

Response


204 No Content

WorkerFilters

Create worker filter

Request

Endpoint

POST http://api.cirro.io/v1/worker-filters
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjaXJyby1hcHAtaWQtZGV2ZWxvcG1lbnQiLCJleHAiOjE2NTU3MTcwNzB9.iQjIySetpcWhfCPSk-TWM_T6dOvRa_f1U7kLna2BB01FnBl4Js-IC2QPtedo7YheoCmqEvbYUHKTTF2Wwy2G1W1MUhtKEDJtnQPLU_tGH_eranR-GGzykQrakfWf3PRfKlzYp9cphlAHj6wUMzX1G21i3lPm0rHEMHrvnFs3o_PcMxCeEbOA-0fvjPwZ1aHxWlvbxWKghE-CrHW10gf5OwhRgIyDG4WkpyqEA9CzK48V92zqQ4uMQAtIevpefuHSVDba9Kthhvxv-PitayQ5XgCJiBU9NZ5jv-2SjbsOVHrLGR9keYKihZdf2yxZTD1JYzm027sM8ibYYw71nj4ImA

POST http://api.cirro.io/v1/worker-filters

Parameters

{"data":{"type":"worker-filters","attributes":{"filter-query":"{ \"size.h\": { \"$lt\": 15 }, \"size.uom\": \"in\", \"status\": \"D\" }"}}}
Name Description
type required Should always be set to worker-filters.
attributes[filter-query] required Mongo DB query to filter workers during gig invitation

Response

Content-Type: application/vnd.api+json
201 Created
{
  "data": {
    "id": "257",
    "type": "worker-filters",
    "links": {
      "self": "http://api.cirro.io/api/v1/worker-filters/257"
    },
    "attributes": {
      "filter-query": "{ \"size.h\": { \"$lt\": 15 }, \"size.uom\": \"in\", \"status\": \"D\" }"
    }
  }
}