Skip to content

Push a customer by your key

PUT
/api/integration/v1/customers/{ref}
curl --request PUT \
--url https://api.slflo.com/api/integration/v1/customers/CUST-0042 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: example' \
--data '{ "address": "12 Tahrir St, Giza", "blocked": false, "credit_limit": 50000, "latitude": 30.0131, "longitude": 31.2089, "name": { "ar": "سوق الأمل", "en": "Al Amal Market" }, "price_list_ref": "RETAIL", "radius_metres": 150, "salflo_id": null, "source_version": "2026-10-05T10:40:00Z" }'

Find or create; the same body twice is unchanged, an older source_version is stale. salflo_id adopts a customer that started in Slflo. Needs customers:write. Send an Idempotency-Key header; a retry with the same key and body answers the first answer again, with Idempotent-Replayed: true.

ref
required
string

Your key for the customer — the account number in your ERP.

Example

CUST-0042
Idempotency-Key
required
string

Your key for this write, at most 100 characters (an order id or journal id works well). Required on every write; kept 7 days. Same key and body: the first answer again. Same key, other body: 422 IDEMPOTENCY_KEY_REUSED.

Media typeapplication/json
object
address
string
blocked
required
boolean
credit_limit
number
latitude
number format: double
longitude
number format: double
name
required
object
key
additional properties
string
price_list_ref
string
radius_metres
integer format: int32
salflo_id
string
source_version
string

Example

{
"address": "12 Tahrir St, Giza",
"blocked": false,
"credit_limit": 50000,
"latitude": 30.0131,
"longitude": 31.2089,
"name": {
"ar": "سوق الأمل",
"en": "Al Amal Market"
},
"price_list_ref": "RETAIL",
"radius_metres": 150,
"salflo_id": null,
"source_version": "2026-10-05T10:40:00Z"
}

Push a customer by your key

Media typeapplication/json
object
data
required
object
entity
required
string
external_ref
required
string
id
required
string
result
required
string

Example

{
"data": {
"entity": "customer",
"external_ref": "CUST-0042",
"id": "C0000001",
"result": "created"
}
}

An error: the code says what, retryable whether to try again.

Media typeapplication/json
object
error
required
object
code
required

Stable code, e.g. SCOPE_MISSING, UNKNOWN_REFERENCE.

string
details
required

Field-level problems: {field, code}.

Array<object>
object
key
additional properties
string
message
required

What happened and how to fix it.

string
request_id
required

Quote it to support; it finds the server log.

string
retryable
required

Whether the same call may succeed later.

boolean

Example

{
"error": {
"code": "SCOPE_MISSING",
"details": [],
"message": "This client does not hold the invoices:read scope.",
"request_id": "req_01J9X4Q7T2M8P3NRT6V5WZ",
"retryable": false
}
}