Skip to content
Developer preview: the API may change before general availability. Request access

Get a job

GET
/jobs/{job_id}
curl --request GET \
--url https://sandbox.partners.loops.sa/v1/jobs/job_01J9R2K7TN \
--header 'Authorization: Bearer <token>' \
--header 'Loops-Merchant-Id: mer_7Hq2Lw8Z'

The status and results of a menu import or publish.

job_id
required
string

The job ID (job_…).

Loops-Merchant-Id
string

The merchant you are acting for (mer_…). Required for platform applications; optional for direct integrations, which have a single merchant.

The job.

Media typeapplication/json
object
id
required
string
type
required
string
Allowed values: menu_import menu_publish
brand_id
string
status
required

pending and running while in progress. succeeded: everything applied. partially_failed: some results failed (publish only). failed: nothing applied.

string
Allowed values: pending running succeeded partially_failed failed
errors

For a failed import, every problem found. An import is all or nothing.

Array<object>
object
external_ref

The menu item the problem is about, if any.

string | null
field
string | null
code
required
string
message
required
string
results

For a publish, one result per location and delivery app.

Array<object>
object
location_id
required
string
channel_connection_id
required
string
channel
required
string
status
required
string
Allowed values: pending succeeded failed
errors

Items the delivery app rejected, and why.

Array<object>
object
external_ref

The menu item the problem is about, if any.

string | null
field
string | null
code
required
string
message
required
string
created_at
required
string format: date-time
completed_at
string | null format: date-time
Example
{
"id": "job_01J9R2K7TN",
"type": "menu_import",
"status": "pending",
"errors": [
{
"external_ref": "PRD-CHICKEN-BURGER",
"field": "image_url",
"code": "image_unreachable",
"message": "The image URL returned 404."
}
],
"results": [
{
"status": "pending",
"errors": [
{
"external_ref": "PRD-CHICKEN-BURGER",
"field": "image_url",
"code": "image_unreachable",
"message": "The image URL returned 404."
}
]
}
]
}

The access token is missing, expired or invalid.

Media typeapplication/problem+json

RFC 9457 Problem Details with a stable code.

object
type
required
string format: uri
title
required
string
status
required
integer
code
required

Stable machine-readable error code. Switch on this, not on title.

string
Allowed values: invalid_request invalid_file merchant_required unauthorized insufficient_scope scope_not_granted connection_not_active application_suspended not_found merchant_not_found merchant_exists external_ref_conflict business_profile_locked idempotency_key_reused rate_limited upstream_unavailable
detail
string
request_id
required
string
existing_id

For external_ref_conflict, the ID of the object that already uses the reference.

string
errors

Field errors, for invalid_request.

Array<object>
object
field
string
message
string
Example
{
"type": "https://docs.partners.loops.sa/errors/external_ref_conflict",
"title": "External reference already used",
"status": 409,
"code": "invalid_request",
"detail": "A location with external_ref BR-01 already exists.",
"request_id": "req_01J9X7P2QK",
"existing_id": "loc_2Xf9K",
"errors": [
{
"field": "products[3].price",
"message": "Required unless the product has variants."
}
]
}

Not found, or not accessible with this connection.

Media typeapplication/problem+json

RFC 9457 Problem Details with a stable code.

object
type
required
string format: uri
title
required
string
status
required
integer
code
required

Stable machine-readable error code. Switch on this, not on title.

string
Allowed values: invalid_request invalid_file merchant_required unauthorized insufficient_scope scope_not_granted connection_not_active application_suspended not_found merchant_not_found merchant_exists external_ref_conflict business_profile_locked idempotency_key_reused rate_limited upstream_unavailable
detail
string
request_id
required
string
existing_id

For external_ref_conflict, the ID of the object that already uses the reference.

string
errors

Field errors, for invalid_request.

Array<object>
object
field
string
message
string
Example
{
"type": "https://docs.partners.loops.sa/errors/external_ref_conflict",
"title": "External reference already used",
"status": 409,
"code": "invalid_request",
"detail": "A location with external_ref BR-01 already exists.",
"request_id": "req_01J9X7P2QK",
"existing_id": "loc_2Xf9K",
"errors": [
{
"field": "products[3].price",
"message": "Required unless the product has variants."
}
]
}