GET
/api-client/sales/customers
apiSalesGetCustomers · Sales
Tenant-scoped sales with fresh USER RBAC or API_CLIENT scopes and PUBLIC_API entitlement. Customers require customers.read/write. Orders require sales.read; draft writes require sales.create (machine sales.write) plus pricing.read. Confirmation adds inventory.adjust (machine inventory.write), refreshes current prices, freezes snapshots and reserves all stock/selected unit UUIDs. Completion requires sales.create+inventory.adjust (machine sales.write+inventory.write) and atomically consumes reservations and appends SALE movements; serialized units become SOLD without custody. Cancellation requires sales.cancel+inventory.adjust (machine sales.write+inventory.write) and releases reservations without reversing physical movements. State DRAFT→CONFIRMED→COMPLETED or cancellation before completion; expectedVersion mandatory. Single legal entity, warehouse and price-list currency per order; at most100 distinct lines and100 serial units. Decimal quantities/prices scale6, unrounded commercial totals scale12. All writes require Idempotency-Key; replay is denied after permission/scope/entitlement revocation. Machine pricing accepts public lists and published active variants. No anonymous access, purchase costs/margins, serial identities, payment, tax, invoice, return or UI in the Sales endpoints; cash checkout composes delivery through POS.
- Autenticación
- PlatformApiKey · http bearer
- required-scopes
suppliers.read
Ejemplo
Los valores entre <> y {} son marcadores: sustitúyelos
por los tuyos antes de ejecutarlo.
curl --request GET \ --url 'https://api.marky.ec/v1/api-client/sales/customers' \ --header 'Authorization: Bearer <PlatformApiKey>'
Parámetros
| Nombre | En | Tipo | Descripción |
|---|---|---|---|
limit
|
query | integermín. 1máx. 100por defecto 50 |
|
cursor
|
query | stringformato uuidpatrón ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$ |
|
status
|
query | stringuno de "ACTIVE", "ARCHIVED"por defecto ACTIVE |
Respuestas
200 Success
-
Cache-Controlvalor fijo "no-store"
application/jsonCustomerPage
objectsin otras propiedades
-
itemsobligatorioarrayelementos máx. 100Cada elementoCustomerobjectsin otras propiedades-
codeobligatoriostringpatrón ^[a-zA-Z][a-zA-Z0-9_.-]*$longitud mín. 1longitud máx. 64 -
nameobligatoriostringlongitud mín. 1longitud máx. 200 -
taxIdobligatoriostring | nulllongitud máx. 64 -
emailobligatoriostring | nulllongitud máx. 254 -
phoneobligatoriostring | nulllongitud máx. 64 -
addressobligatoriostring | nulllongitud máx. 1000Free text of up to 1000 characters. May hold several lines (CRLF is stored as LF); any other control character is refused.
-
idobligatoriostringformato uuidpatrón ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$ -
statusobligatoriostringuno de "ACTIVE", "ARCHIVED" -
createdAtobligatoriostringformato date-time -
updatedAtobligatoriostringformato date-time -
profileobligatorioContactProfileobjectsin otras propiedadesExtended record (CONTACTS-1), always whole: null or an empty list where nothing was stated. Descriptive only: it grants no credit and computes no charge or tax.
-
contactTypeobligatoriostring | nulluno de "COMPANY", "PERSON", null -
companyNameobligatoriostring | nullpatrón ^[^\u0000-\u001f\u007f-\u009f]*\S[^\u0000-\u001f\u007f-\u009f]*$longitud mín. 1longitud máx. 200Legal name.
-
tradeNameobligatoriostring | nullpatrón ^[^\u0000-\u001f\u007f-\u009f]*\S[^\u0000-\u001f\u007f-\u009f]*$longitud mín. 1longitud máx. 200 -
taxIdTypeobligatoriostring | nulluno de "RUC", "CEDULA", "PASSPORT", "OTHER", nullWhat the taxId of the record is.
-
taxIdTypeOtherobligatoriostring | nullpatrón ^[^\u0000-\u001f\u007f-\u009f]*\S[^\u0000-\u001f\u007f-\u009f]*$longitud mín. 1longitud máx. 40Names the identification. Accepted only with taxIdType OTHER.
-
websiteobligatoriostring | nullpatrón ^[hH][tT][tT][pP][sS]?://[A-Za-z0-9]([A-Za-z0-9.-]*[A-Za-z0-9])?(:[0-9]{1,5})?([/?#][^\s\\]*)?$longitud máx. 500http or https only, with a host and without credentials.
-
mobileobligatoriostring | nullpatrón ^[^\u0000-\u001f\u007f-\u009f]*\S[^\u0000-\u001f\u007f-\u009f]*$longitud mín. 1longitud máx. 64 -
languageobligatoriostring | nulluno de "es", "en", "pt", "fr", "other", null -
primaryContactobligatorioobjectsin otras propiedadesThe person the record is addressed to. Their email and phone are the email and phone of the record.
-
salutationobligatoriostring | nullpatrón ^[^\u0000-\u001f\u007f-\u009f]*\S[^\u0000-\u001f\u007f-\u009f]*$longitud mín. 1longitud máx. 20 -
firstNameobligatoriostring | nullpatrón ^[^\u0000-\u001f\u007f-\u009f]*\S[^\u0000-\u001f\u007f-\u009f]*$longitud mín. 1longitud máx. 100 -
lastNameobligatoriostring | nullpatrón ^[^\u0000-\u001f\u007f-\u009f]*\S[^\u0000-\u001f\u007f-\u009f]*$longitud mín. 1longitud máx. 100 -
jobTitleobligatoriostring | nullpatrón ^[^\u0000-\u001f\u007f-\u009f]*\S[^\u0000-\u001f\u007f-\u009f]*$longitud mín. 1longitud máx. 100 -
departmentobligatoriostring | nullpatrón ^[^\u0000-\u001f\u007f-\u009f]*\S[^\u0000-\u001f\u007f-\u009f]*$longitud mín. 1longitud máx. 100
-
-
billingAddressobligatorioobjectsin otras propiedades-
attentionobligatoriostring | nullpatrón ^[^\u0000-\u001f\u007f-\u009f]*\S[^\u0000-\u001f\u007f-\u009f]*$longitud mín. 1longitud máx. 200 -
countryCodeobligatoriostring | nullpatrón ^[A-Za-z]{2}$ISO 3166-1 alpha-2. Stored in capitals.
-
stateobligatoriostring | nullpatrón ^[^\u0000-\u001f\u007f-\u009f]*\S[^\u0000-\u001f\u007f-\u009f]*$longitud mín. 1longitud máx. 100 -
cityobligatoriostring | nullpatrón ^[^\u0000-\u001f\u007f-\u009f]*\S[^\u0000-\u001f\u007f-\u009f]*$longitud mín. 1longitud máx. 100 -
street1obligatoriostring | nullpatrón ^[^\u0000-\u0009\u000b-\u001f\u007f-\u009f]*\S[^\u0000-\u0009\u000b-\u001f\u007f-\u009f]*$longitud mín. 1longitud máx. 200May hold several lines.
-
street2obligatoriostring | nullpatrón ^[^\u0000-\u0009\u000b-\u001f\u007f-\u009f]*\S[^\u0000-\u0009\u000b-\u001f\u007f-\u009f]*$longitud mín. 1longitud máx. 200May hold several lines.
-
postalCodeobligatoriostring | nullpatrón ^[^\u0000-\u001f\u007f-\u009f]*\S[^\u0000-\u001f\u007f-\u009f]*$longitud mín. 1longitud máx. 20 -
phoneobligatoriostring | nullpatrón ^[^\u0000-\u001f\u007f-\u009f]*\S[^\u0000-\u001f\u007f-\u009f]*$longitud mín. 1longitud máx. 64
-
-
shippingAddressobligatorioobjectsin otras propiedadesIts own values: it is never linked to the billing address.
-
attentionobligatoriostring | nullpatrón ^[^\u0000-\u001f\u007f-\u009f]*\S[^\u0000-\u001f\u007f-\u009f]*$longitud mín. 1longitud máx. 200 -
countryCodeobligatoriostring | nullpatrón ^[A-Za-z]{2}$ISO 3166-1 alpha-2. Stored in capitals.
-
stateobligatoriostring | nullpatrón ^[^\u0000-\u001f\u007f-\u009f]*\S[^\u0000-\u001f\u007f-\u009f]*$longitud mín. 1longitud máx. 100 -
cityobligatoriostring | nullpatrón ^[^\u0000-\u001f\u007f-\u009f]*\S[^\u0000-\u001f\u007f-\u009f]*$longitud mín. 1longitud máx. 100 -
street1obligatoriostring | nullpatrón ^[^\u0000-\u0009\u000b-\u001f\u007f-\u009f]*\S[^\u0000-\u0009\u000b-\u001f\u007f-\u009f]*$longitud mín. 1longitud máx. 200May hold several lines.
-
street2obligatoriostring | nullpatrón ^[^\u0000-\u0009\u000b-\u001f\u007f-\u009f]*\S[^\u0000-\u0009\u000b-\u001f\u007f-\u009f]*$longitud mín. 1longitud máx. 200May hold several lines.
-
postalCodeobligatoriostring | nullpatrón ^[^\u0000-\u001f\u007f-\u009f]*\S[^\u0000-\u001f\u007f-\u009f]*$longitud mín. 1longitud máx. 20 -
phoneobligatoriostring | nullpatrón ^[^\u0000-\u001f\u007f-\u009f]*\S[^\u0000-\u001f\u007f-\u009f]*$longitud mín. 1longitud máx. 64
-
-
contactPersonsobligatorioarrayelementos máx. 20Further people, at most 20. Written, each one states at least one value.
Cada elementoobjectsin otras propiedades-
firstNameobligatoriostring | nullpatrón ^[^\u0000-\u001f\u007f-\u009f]*\S[^\u0000-\u001f\u007f-\u009f]*$longitud mín. 1longitud máx. 100 -
lastNameobligatoriostring | nullpatrón ^[^\u0000-\u001f\u007f-\u009f]*\S[^\u0000-\u001f\u007f-\u009f]*$longitud mín. 1longitud máx. 100 -
jobTitleobligatoriostring | nullpatrón ^[^\u0000-\u001f\u007f-\u009f]*\S[^\u0000-\u001f\u007f-\u009f]*$longitud mín. 1longitud máx. 100 -
departmentobligatoriostring | nullpatrón ^[^\u0000-\u001f\u007f-\u009f]*\S[^\u0000-\u001f\u007f-\u009f]*$longitud mín. 1longitud máx. 100 -
emailobligatoriostring | nullpatrón ^[^\s@]+@[^\s@]+\.[^\s@]+$longitud máx. 254 -
phoneobligatoriostring | nullpatrón ^[^\u0000-\u001f\u007f-\u009f]*\S[^\u0000-\u001f\u007f-\u009f]*$longitud mín. 1longitud máx. 64 -
mobileobligatoriostring | nullpatrón ^[^\u0000-\u001f\u007f-\u009f]*\S[^\u0000-\u001f\u007f-\u009f]*$longitud mín. 1longitud máx. 64
-
-
currencyCodeobligatoriostring | nullpatrón ^[a-zA-Z]{3}$Preferred ISO 4217 currency among the supported ones, stored in capitals. Documents keep stating their own.
-
paymentTermsDaysobligatoriointeger | nullmín. 0máx. 3650Informative: no due date, credit or charge is derived from it.
-
notesobligatoriostring | nullpatrón ^[^\u0000-\u0009\u000b-\u001f\u007f-\u009f]*\S[^\u0000-\u0009\u000b-\u001f\u007f-\u009f]*$longitud mín. 1longitud máx. 4000May hold several lines.
-
tagsobligatorioarrayelementos máx. 20At most 20, unique without regard to case.
Cada elementostringpatrón ^[^\u0000-\u001f\u007f-\u009f]*\S[^\u0000-\u001f\u007f-\u009f]*$longitud mín. 1longitud máx. 40 -
customFieldsobligatorioarrayelementos máx. 20At most 20 name/value pairs with unique names.
Cada elementoobjectsin otras propiedades-
nameobligatoriostringpatrón ^[^\u0000-\u001f\u007f-\u009f]*\S[^\u0000-\u001f\u007f-\u009f]*$longitud mín. 1longitud máx. 64 -
valueobligatoriostringpatrón ^[^\u0000-\u001f\u007f-\u009f]*\S[^\u0000-\u001f\u007f-\u009f]*$longitud mín. 1longitud máx. 500
-
-
-
-
nextCursorobligatoriostring | nullformato uuidpatrón ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$
400 Invalid request
application/problem+jsonProblemDetails
objectsin otras propiedades
-
typeobligatoriovalor fijo "about:blank" -
statusobligatoriointeger -
codeobligatoriostring -
titleobligatoriostring -
detailobligatoriostring -
requestIdobligatoriostringformato uuid -
errorsarrayelementos máx. 200Where each problem is, for the codes that can say it: a JSON pointer into the request or the record (`/items/0/devices/1/imei1`) and the reason. A line of a serialized article that is short of units also says how many it bills and how many are identified. Never a value typed by the user, and never an identifier of a unit.
Cada elementoobjectsin otras propiedades-
pointerobligatoriostring -
codeobligatoriostring -
requiredintegermín. 0máx. 1000For a line short of units (UNITS_DIFFER_FROM_QUANTITY, RECEIPT_REQUIRED, DELIVERY_REQUIRED): how many units the line bills.
-
identifiedintegermín. 0máx. 1000For the same line: how many units are identified and linked to it. Given to every reader of the document; no IMEI or serial number is.
-
401 Missing or invalid access token
application/problem+jsonProblemDetails
objectsin otras propiedades
-
typeobligatoriovalor fijo "about:blank" -
statusobligatoriointeger -
codeobligatoriostring -
titleobligatoriostring -
detailobligatoriostring -
requestIdobligatoriostringformato uuid -
errorsarrayelementos máx. 200Where each problem is, for the codes that can say it: a JSON pointer into the request or the record (`/items/0/devices/1/imei1`) and the reason. A line of a serialized article that is short of units also says how many it bills and how many are identified. Never a value typed by the user, and never an identifier of a unit.
Cada elementoobjectsin otras propiedades-
pointerobligatoriostring -
codeobligatoriostring -
requiredintegermín. 0máx. 1000For a line short of units (UNITS_DIFFER_FROM_QUANTITY, RECEIPT_REQUIRED, DELIVERY_REQUIRED): how many units the line bills.
-
identifiedintegermín. 0máx. 1000For the same line: how many units are identified and linked to it. Given to every reader of the document; no IMEI or serial number is.
-
403 Identity, membership or permission denied
application/problem+jsonProblemDetails
objectsin otras propiedades
-
typeobligatoriovalor fijo "about:blank" -
statusobligatoriointeger -
codeobligatoriostring -
titleobligatoriostring -
detailobligatoriostring -
requestIdobligatoriostringformato uuid -
errorsarrayelementos máx. 200Where each problem is, for the codes that can say it: a JSON pointer into the request or the record (`/items/0/devices/1/imei1`) and the reason. A line of a serialized article that is short of units also says how many it bills and how many are identified. Never a value typed by the user, and never an identifier of a unit.
Cada elementoobjectsin otras propiedades-
pointerobligatoriostring -
codeobligatoriostring -
requiredintegermín. 0máx. 1000For a line short of units (UNITS_DIFFER_FROM_QUANTITY, RECEIPT_REQUIRED, DELIVERY_REQUIRED): how many units the line bills.
-
identifiedintegermín. 0máx. 1000For the same line: how many units are identified and linked to it. Given to every reader of the document; no IMEI or serial number is.
-
404 Unknown resource
application/problem+jsonProblemDetails
objectsin otras propiedades
-
typeobligatoriovalor fijo "about:blank" -
statusobligatoriointeger -
codeobligatoriostring -
titleobligatoriostring -
detailobligatoriostring -
requestIdobligatoriostringformato uuid -
errorsarrayelementos máx. 200Where each problem is, for the codes that can say it: a JSON pointer into the request or the record (`/items/0/devices/1/imei1`) and the reason. A line of a serialized article that is short of units also says how many it bills and how many are identified. Never a value typed by the user, and never an identifier of a unit.
Cada elementoobjectsin otras propiedades-
pointerobligatoriostring -
codeobligatoriostring -
requiredintegermín. 0máx. 1000For a line short of units (UNITS_DIFFER_FROM_QUANTITY, RECEIPT_REQUIRED, DELIVERY_REQUIRED): how many units the line bills.
-
identifiedintegermín. 0máx. 1000For the same line: how many units are identified and linked to it. Given to every reader of the document; no IMEI or serial number is.
-
409 Duplicate permanent identity/IMEI, stale unit version, reserved/illegal unit state, custody/legal entity constraint or idempotency conflict.
application/problem+jsonProblemDetails
objectsin otras propiedades
-
typeobligatoriovalor fijo "about:blank" -
statusobligatoriointeger -
codeobligatoriostring -
titleobligatoriostring -
detailobligatoriostring -
requestIdobligatoriostringformato uuid -
errorsarrayelementos máx. 200Where each problem is, for the codes that can say it: a JSON pointer into the request or the record (`/items/0/devices/1/imei1`) and the reason. A line of a serialized article that is short of units also says how many it bills and how many are identified. Never a value typed by the user, and never an identifier of a unit.
Cada elementoobjectsin otras propiedades-
pointerobligatoriostring -
codeobligatoriostring -
requiredintegermín. 0máx. 1000For a line short of units (UNITS_DIFFER_FROM_QUANTITY, RECEIPT_REQUIRED, DELIVERY_REQUIRED): how many units the line bills.
-
identifiedintegermín. 0máx. 1000For the same line: how many units are identified and linked to it. Given to every reader of the document; no IMEI or serial number is.
-
413 Payload too large
application/problem+jsonProblemDetails
objectsin otras propiedades
-
typeobligatoriovalor fijo "about:blank" -
statusobligatoriointeger -
codeobligatoriostring -
titleobligatoriostring -
detailobligatoriostring -
requestIdobligatoriostringformato uuid -
errorsarrayelementos máx. 200Where each problem is, for the codes that can say it: a JSON pointer into the request or the record (`/items/0/devices/1/imei1`) and the reason. A line of a serialized article that is short of units also says how many it bills and how many are identified. Never a value typed by the user, and never an identifier of a unit.
Cada elementoobjectsin otras propiedades-
pointerobligatoriostring -
codeobligatoriostring -
requiredintegermín. 0máx. 1000For a line short of units (UNITS_DIFFER_FROM_QUANTITY, RECEIPT_REQUIRED, DELIVERY_REQUIRED): how many units the line bills.
-
identifiedintegermín. 0máx. 1000For the same line: how many units are identified and linked to it. Given to every reader of the document; no IMEI or serial number is.
-
429 Per-minute rate or monthly quota exceeded; authenticated API clients require PUBLIC_API entitlement.
-
Retry-Afterintegermín. 1Seconds before retrying; quota reset is UTC next month.
application/problem+jsonProblemDetails
objectsin otras propiedades
-
typeobligatoriovalor fijo "about:blank" -
statusobligatoriointeger -
codeobligatoriostring -
titleobligatoriostring -
detailobligatoriostring -
requestIdobligatoriostringformato uuid -
errorsarrayelementos máx. 200Where each problem is, for the codes that can say it: a JSON pointer into the request or the record (`/items/0/devices/1/imei1`) and the reason. A line of a serialized article that is short of units also says how many it bills and how many are identified. Never a value typed by the user, and never an identifier of a unit.
Cada elementoobjectsin otras propiedades-
pointerobligatoriostring -
codeobligatoriostring -
requiredintegermín. 0máx. 1000For a line short of units (UNITS_DIFFER_FROM_QUANTITY, RECEIPT_REQUIRED, DELIVERY_REQUIRED): how many units the line bills.
-
identifiedintegermín. 0máx. 1000For the same line: how many units are identified and linked to it. Given to every reader of the document; no IMEI or serial number is.
-
500 Internal failure
application/problem+jsonProblemDetails
objectsin otras propiedades
-
typeobligatoriovalor fijo "about:blank" -
statusobligatoriointeger -
codeobligatoriostring -
titleobligatoriostring -
detailobligatoriostring -
requestIdobligatoriostringformato uuid -
errorsarrayelementos máx. 200Where each problem is, for the codes that can say it: a JSON pointer into the request or the record (`/items/0/devices/1/imei1`) and the reason. A line of a serialized article that is short of units also says how many it bills and how many are identified. Never a value typed by the user, and never an identifier of a unit.
Cada elementoobjectsin otras propiedades-
pointerobligatoriostring -
codeobligatoriostring -
requiredintegermín. 0máx. 1000For a line short of units (UNITS_DIFFER_FROM_QUANTITY, RECEIPT_REQUIRED, DELIVERY_REQUIRED): how many units the line bills.
-
identifiedintegermín. 0máx. 1000For the same line: how many units are identified and linked to it. Given to every reader of the document; no IMEI or serial number is.
-
503 Auth/database/governance unavailable; no memory fallback for Redis.
application/problem+jsonProblemDetails
objectsin otras propiedades
-
typeobligatoriovalor fijo "about:blank" -
statusobligatoriointeger -
codeobligatoriostring -
titleobligatoriostring -
detailobligatoriostring -
requestIdobligatoriostringformato uuid -
errorsarrayelementos máx. 200Where each problem is, for the codes that can say it: a JSON pointer into the request or the record (`/items/0/devices/1/imei1`) and the reason. A line of a serialized article that is short of units also says how many it bills and how many are identified. Never a value typed by the user, and never an identifier of a unit.
Cada elementoobjectsin otras propiedades-
pointerobligatoriostring -
codeobligatoriostring -
requiredintegermín. 0máx. 1000For a line short of units (UNITS_DIFFER_FROM_QUANTITY, RECEIPT_REQUIRED, DELIVERY_REQUIRED): how many units the line bills.
-
identifiedintegermín. 0máx. 1000For the same line: how many units are identified and linked to it. Given to every reader of the document; no IMEI or serial number is.
-