Marmin

The Customer party object


When you create a sales invoice, sales credit note, or proforma invoice, you pass the buyer's details inline in the accounting_customer_party object. This page documents validation rules for document create payloads — not a standalone customer profile API.

On sales documents, the supplier (accounting_supplier_party) is set automatically from the {profileId} business profile—do not send it. On purchase documents, the customer (accounting_customer_party) is set from the profile—see Supplier validation for the party you must send.

Customer rules are not the same as business profile or supplier rules.

Before you start

  • Decide whether the customer is a business or an individual. On sale documents, Marmin infers this from scheme_agency_id: EID or PAS means individual; all other values (or omission) mean business.

  • Check whether the customer's address is in the UAE (country_code = AE) or outside the UAE.

  • Registration details are optional. You do not need to send scheme_agency_id, company_id, authority_name, or passport_issuing_country_code unless you want to include them.

  • Keep registration and VAT separate:

  • Registration number (company_id) — trade license, cabinet decision, Emirates ID, passport number, or other identifier (only when you send registration details)

  • VAT number / TRN (party_tax_scheme.company_id) — 15-digit UAE tax registration number

Request fields

Fields on accounting_customer_party when creating or resubmitting sale documents. Rows are ordered RequiredConditionalOptional.

FieldTypeRequiredDescriptionValidation
namestring
Required
Display name for the customer.Non-empty text.
emailstring
Required
Customer email address.Valid email format.
postal_addressobject
Required
Customer address.See Request postal_address section for details.
party_namestring
Conditional
Legal name of the business.Required for business customers. Do not send for individuals.
company_idstring
Conditional
Official registration or identity number. Not the VAT/TRN.Required when scheme_agency_id is provided.
authority_namestring
Conditional
Issuing authority for the trade license.Required when scheme_agency_id is TL.
passport_issuing_country_codestring
Conditional
Country that issued the passport.Required when scheme_agency_id is PAS and registration details are included.
tinstring
Conditional
Taxpayer Identification Number (TIN) from EmaraTax.Required for UAE business customers — 10 characters, starts with 1. Do not send for non-UAE business customers or individuals.
party_name_in_local_languagestring
Optional
Customer name in Arabic or local language.
scheme_agency_idstring
Optional
Registration type when including registration details.See Get Registration Types section for details.
party_tax_schemeobject
Optional
UAE VAT details for UAE business customers.If either field is sent, both are required. See Request party_tax_scheme section for details. Do not send if the customer is not eligible for VAT, or for non-UAE business customers or individuals.
endpoint_idstring
Optional
Peppol electronic address for the customer.Valid Peppol endpoint when sent.
endpoint_scheme_idstring
Optional
Scheme for endpoint_id.Typically 0235. See Get Electronic Address Schemes section for details.
telephonestring
Optional
Customer telephone number.

Do not send on create: profile_id (use only when referencing an existing registered profile; returned in responses). Do not confuse with business_profile_id in the URL path.

Request postal_address
FieldTypeRequiredDescriptionValidation
street_namestring
Required
Street name or primary address line.Non-empty.
city_namestring
Required
City or town.Non-empty.
country_subentitystring
Required
Emirate, state, or region code (e.g. DXB).For UAE (AE), use Get UAE Subdivisions.
countrystring
Required
Country name (e.g. United Arab Emirates).Non-empty.
country_codestring
Required
ISO 3166-1 alpha-2 country code (e.g. AE).See Get Countries section for details.
additional_street_namestring
Optional
Additional street details.
postal_zonestring
Optional
Postal or ZIP code.
address_linestring
Optional
Additional address line.
Request party_tax_scheme
FieldTypeRequiredDescriptionValidation
company_idstring
Conditional
UAE VAT registration number (TRN).15 digits; starts with 1 and ends with 03. Required if party_tax_scheme is sent.
tax_schemestring
Conditional
Tax scheme, usually VAT.Required if party_tax_scheme is sent. See Get Tax Schemes section for details.
Response fields

Fields returned on accounting_customer_party in document retrieve/list/create responses.

Core fields
FieldTypeSourceDescription
namestringUser ProvidedDisplay name echoed from the request.
emailstringUser ProvidedCustomer email echoed from the request.
party_namestringUser ProvidedLegal business name when provided on create.
party_name_in_local_languagestringUser ProvidedLocal-language name when provided.
scheme_agency_idstringUser ProvidedRegistration type when provided.
company_idstringUser ProvidedRegistration number when provided.
authority_namestringUser ProvidedTrade license authority when provided.
passport_issuing_country_codestringUser ProvidedPassport country when provided.
tinstringUser ProvidedTIN when provided.
party_tax_schemeobjectUser ProvidedVAT details when provided on create.
endpoint_idstringUser ProvidedPeppol endpoint when provided.
endpoint_scheme_idstringUser ProvidedEndpoint scheme when provided.
telephonestringUser ProvidedTelephone when provided.
profile_idstringSystem ProvidedBusiness profile identifier when the party was linked to a registered profile. Do not send on create — returned in responses only.
postal_addressobjectUser ProvidedAddress with optional system fields. See Response postal_address section for details.
Response postal_address
FieldTypeSourceDescription
idstring (UUID)System ProvidedPersisted address record identifier.
street_namestringUser ProvidedStreet name from request.
additional_street_namestringUser ProvidedAdditional street details.
city_namestringUser ProvidedCity name.
postal_zonestringUser ProvidedPostal code.
country_subentitystringUser ProvidedRegion or emirate code.
address_linestringUser ProvidedAdditional address line.
countrystringUser ProvidedCountry name.
country_codestringUser ProvidedISO country code.
Conditional field rules

ConditionAffected fieldsRule
Business customer (not EID/PAS)party_nameRequired.
Individual customer (scheme_agency_id is EID or PAS)party_name, tin, party_tax_schemeDo not send.
UAE business customertinRequired — 10 characters, starts with 1.
Non-UAE business customertin, party_tax_schemeDo not send.
scheme_agency_id is providedcompany_idRequired.
scheme_agency_id is TLauthority_nameRequired.
scheme_agency_id is PASpassport_issuing_country_codeRequired when registration details are included.
party_tax_scheme partially sentcompany_id, tax_schemeBoth required with valid TRN format.
Export transaction (profile_execution_id position 8 is 1, format XXXXXXX1)party_tax_scheme on non-UAE buyerOptional — VAT may be omitted.
Non-UAE B2B (not export)party_tax_schemeForbidden.
Validation by scenario

UAE business customer
What to sendRule
name, email, postal_addressRequired
party_nameRequired
tinRequired — 10 characters, starts with 1
scheme_agency_id, company_id, authority_nameOptional — registration details are not required
party_tax_schemeOptional; if sent, both TRN and tax_scheme required with valid TRN format
passport_issuing_country_codeDo not send
Non-UAE business customer
What to sendRule
name, email, party_name, postal_addressRequired
scheme_agency_idOptional; OTH is typical
company_idOptional; only send with scheme_agency_id
tinDo not send
party_tax_schemeDo not send
UAE individual customer
What to sendRule
name, email, postal_addressRequired
scheme_agency_idOptional; if sent, must be EID or PAS
party_nameDo not send
authority_nameDo not send
tin, party_tax_schemeDo not send
passport_issuing_country_codeRequired when scheme_agency_id is PAS
If you include registration details

Registration fields are optional. If you choose to send scheme_agency_id, the following rules apply:

Registration type (scheme_agency_id)Additional fields when registration is included
Anycompany_id is required when scheme_agency_id is provided
TL (Trade License)authority_name is also required
PAS (Passport)passport_issuing_country_code is also required for UAE addresses
Business customer (UAE)TL or CD are typical
Business customer (non-UAE)OTH is typical
Individual customerEID or PAS

See Get Registration Types section for details.

Using this object on sale documents

Include these fields on accounting_customer_party when you create or resubmit a sales invoice or sales credit note. The same rules apply on proforma invoices for the customer party.

For export transactions, see Export transaction with delivery.

Next