YOM Docs

Commerce creation

YOM can delegate the approval of new commerces to the customer's system. When a seller fills out the commerce registration form in the YOM app, YOM sends an HTTP POST request to the customer's endpoint with the form answers. The customer responds whether it approves, rejects, or returns observations on the request and, if it approves, provides the data used to create the Commerce in YOM.

<aside> 📝

The customer must expose the endpoint and give YOM its full URL. The registration form (questions and options) is configured together with YOM during implementation.

</aside>

Flow


  1. The seller fills out the registration form in the YOM app.
  2. YOM sends the request to the customer's endpoint.
  3. The customer responds with the request status:
  4. A pending request is closed when the commerce reaches YOM through the usual Commerces upload.

Endpoint


POST <url_informada_por_el_cliente>

Headers YOM sends

Request body

{
  "commerceRequest": { ... }
}

Fields


CommerceRequest

The commerce creation request.

Field Type Requirement Description Examples
_id 🆔 ObjectId 🟢 Required Identifier of the request in YOM. We recommend using it as the idempotency key. "66fd1a2b3c4d5e6f7a8b9c0d"
domain 📝 Text 🟢 Required Domain of the customer the request belongs to. "cliente.youorder.me"
status 📝 Text 🟢 Required Status of the request at the time it was sent. "pending"
form 🔡 List of Objects → FormAnswer 🟢 Required Answers from the registration form. See details below.
tempId 📝 Text ⚪ Optional Temporary identifier of the request generated by the app. It is kept if the seller resubmits the request. "lead-9f3a1c"
requestNum 🔢 Number ⚪ Optional Sequential number of the request. 783
externalSellerId 📝 Text ⚪ Optional Code of the Seller that created the request in the customer's system. "V015"
source 📝 Object ⚪ Optional Origin of the request: sourceType (for example "seller") and sourceExternalId (the seller's code). {"sourceType": "seller", "sourceExternalId": "V015"}
createdBy 📝 Text ⚪ Optional User that created the request. "[email protected]"
createdAt 📅 Date 🟢 Required Creation date of the request in ISO 8601 format. "2026-10-02T14:32:00.000Z"

FormAnswer

Each element of commerceRequest.form. The questions depend on the form configured for the customer.