Skip to content

Get Queue Jobs ​

GET /api/hype-custom/integrations/{integrationId}/queue-jobs

Returns the integration's queued jobs with 200 OK. An empty queue returns []. A request for an integration outside the authenticated account is rejected with 500 and {"error": 1, "message": "This action is unauthorized."}.

These jobs create the synchronization tasks returned by /tasks/hype-custom/[Entity]. A job can fail when a related record, such as an item referenced by an order, has not yet been synchronized between the two accounts. HES pauses the queue while the missing record is synchronized, then retries creating the order's task for the receiving platform.

The response is an array of objects with these fields:

id is the unique queue-job identifier.

request_method is the request method used by the source account.

entity is the name of the entity the job operates on.

payload contains the data the source platform submitted for synchronization.

source identifies the source platform account.

status indicates whether the job failed or is awaiting processing. Values are failed and pending.

error_msg describes the processing error when the status is failed.

json
{
  "id": "1f6cc4e9-222f-4ee1-95fd-517e9b28dde8",
  "entity": "CategoryEntity",
  "request_method": "PUT",
  "payload": {
    "id": 53,
    "name": "TEST 4",
    "color": "#674AEF",
    "order": 9007199254740991,
    "createdAt": "2024-04-15T12:15:37.013Z",
    "updatedAt": "2024-04-15T12:15:57.000Z",
    "mainCategoryId": null
  },
  "source": {
    "id": "9a583928-13d9-4a0f-bb7f-c02b847a927c",
    "name": "hype-fe.stage.scalewest.com"
  },
  "status": "failed",
  "error_msg": "The entity with name TEST 4, which the platform is attempting to update, has not yet been fully synchronized between the two platforms."
}

The example shows a job for a Category update from hype-fe.stage.scalewest.com; it is also the first entry in the list below. HES cannot create the update task yet because a task in /tasks/hype-custom/categories still needs to create the record on the receiving platform. Process that initial POST task before HES can create the update task.

Request ​

http
GET https://es.dev.hype-software.com/api/hype-custom/integrations/{integrationId}/queue-jobs
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
Content-Type: application/json

Path parameters ​

ParameterExample
integrationIdYour integrationId

Response examples ​

200 · Get Queue Jobs ​

json
[
  {
    "id": "1f6cc4e9-222f-4ee1-95fd-517e9b28dde8",
    "entity": "CategoryEntity",
    "request_method": "PUT",
    "payload": {
      "id": 53,
      "name": "TEST 4",
      "color": "#674AEF",
      "order": 9007199254740991,
      "createdAt": "2024-04-15T12:15:37.013Z",
      "updatedAt": "2024-04-15T12:15:57.000Z",
      "mainCategoryId": null
    },
    "source": {
      "id": "9a583928-13d9-4a0f-bb7f-c02b847a927c",
      "name": "hype-fe.stage.scalewest.com"
    },
    "status": "failed",
    "error_msg": "The entity with name TEST 4, which the platform is attempting to update, has not yet been fully synchronized between the two platforms."
  },
  {
    "id": "e333eb4b-3d15-4b51-805f-0f95b7c9791f",
    "entity": "CategoryEntity",
    "request_method": "POST",
    "payload": {
      "id": 54,
      "name": "Специална бира",
      "color": "#E5E5E7",
      "order": 9007199254740991,
      "createdAt": "2024-04-18T11:49:05.955Z",
      "updatedAt": "2024-04-18T11:49:05.955Z",
      "mainCategoryId": null
    },
    "source": {
      "id": "9a583928-13d9-4a0f-bb7f-c02b847a927c",
      "name": "demo.hype-software.com"
    },
    "status": "pending",
    "error_msg": null
  },
  {
    "id": "ebb32f39-0c13-4d2a-9ded-fd72358367b7",
    "entity": "CategoryEntity",
    "request_method": "POST",
    "payload": {
      "id": 55,
      "name": "Много специална бира",
      "color": "#E5E5E7",
      "order": 9007199254740991,
      "createdAt": "2024-04-18T13:38:47.546Z",
      "updatedAt": "2024-04-18T13:38:47.546Z",
      "mainCategoryId": null
    },
    "source": {
      "id": "9a583928-13d9-4a0f-bb7f-c02b847a927c",
      "name": "hype-fe.stage.scalewest.com"
    },
    "status": "pending",
    "error_msg": null
  },
  {
    "id": "7e228673-30ef-4ad2-8920-75120488f8ab",
    "entity": "CategoryEntity",
    "request_method": "POST",
    "payload": {
      "id": 56,
      "name": "Специално червено вино",
      "color": "#674AEF",
      "order": 9007199254740991,
      "createdAt": "2024-04-19T07:44:58.162Z",
      "updatedAt": "2024-04-26T11:39:12.000Z",
      "mainCategoryId": 4
    },
    "source": {
      "id": "9a583928-13d9-4a0f-bb7f-c02b847a927c",
      "name": "hype-fe.stage.scalewest.com"
    },
    "status": "pending",
    "error_msg": null
  },
  {
    "id": "5de7fd5e-9fb0-4e19-9c01-8763a90094a3",
    "entity": "OrderRequestStatusEntity",
    "request_method": "POST",
    "payload": {
      "id": 1,
      "translationKey": "NEW",
      "src_status": {}
    },
    "source": {
      "id": "9a583928-13d9-4a0f-bb7f-c02b847a927c",
      "name": "hype-fe.stage.scalewest.com"
    },
    "status": "pending",
    "error_msg": null
  }
]

Hype Exchange Service API