Create a merchant
const url = 'https://sandbox.partners.loops.sa/v1/merchants';const options = { method: 'POST', headers: { 'Idempotency-Key': '6f1c2a9e-3b7d-4c55-9a40-2d8e1f7b9c31', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"external_ref":"BR-01","name":{"en":"example","ar":"example"},"owner":{"name":"Sara Al-Harbi","email":"sara@example.sa","phone":"+966501234567"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://sandbox.partners.loops.sa/v1/merchants \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: 6f1c2a9e-3b7d-4c55-9a40-2d8e1f7b9c31' \ --data '{ "external_ref": "BR-01", "name": { "en": "example", "ar": "example" }, "owner": { "name": "Sara Al-Harbi", "email": "sara@example.sa", "phone": "+966501234567" } }'Creates a new business in Loops and connects it to your application. Loops invites the owner by email to sign in to Loops; you never handle the owner’s password.
The merchant can be used straight away: add brands, locations and menus. Its locations go live on delivery apps after Loops approves the business profile.
Don’t send Loops-Merchant-Id on this request.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”A unique value (a UUID) for this request. If you retry with the same key within 24 hours, you get the original response instead of a second change.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Your own ID for this object, from your system. Unique within its type for the merchant
(for menu items, within the brand). Letters, digits, -, _, . and :.
Text in English and Arabic. Delivery apps in Saudi Arabia show both, so both are required.
object
object
Loops sends the sign-in invitation here.
E.164 format.
Responses
Section titled “Responses”The new merchant.
object
Text in English and Arabic.
object
object
Whether the owner has accepted the invitation to sign in to Loops.
draft: being filled in. in_review: submitted, Loops is reviewing it.
approved: locations can go live on delivery apps. rejected: fix what the review says and submit again.
Example
{ "id": "mer_7Hq2Lw8Z", "external_ref": "CUST-10021", "status": "active", "owner": { "invitation": "sent" }, "business_profile_status": "draft"}The request is invalid. errors lists each problem.
RFC 9457 Problem Details with a stable code.
object
Stable machine-readable error code. Switch on this, not on title.
For external_ref_conflict, the ID of the object that already uses the reference.
Field errors, for invalid_request.
object
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." } ]}The access token is missing, expired or invalid.
RFC 9457 Problem Details with a stable code.
object
Stable machine-readable error code. Switch on this, not on title.
For external_ref_conflict, the ID of the object that already uses the reference.
Field errors, for invalid_request.
object
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 allowed: the scope isn’t approved or granted, the connection is not active,
or your application is suspended. See code.
RFC 9457 Problem Details with a stable code.
object
Stable machine-readable error code. Switch on this, not on title.
For external_ref_conflict, the ID of the object that already uses the reference.
Field errors, for invalid_request.
object
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." } ]}The request conflicts with the current state, for example an external_ref already in use,
or a business profile that is in review. See code.
RFC 9457 Problem Details with a stable code.
object
Stable machine-readable error code. Switch on this, not on title.
For external_ref_conflict, the ID of the object that already uses the reference.
Field errors, for invalid_request.
object
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." } ]}© 2026 Loops Technologies | شركة لووبز للتقنيات. All rights reserved.
