Skip to content

Create Order

Request

Crea una nueva órden, puedes enviar el número de teléfono o email del cliente si ya esta creado en mercately, si no existe, creará el cliente.

Security
api-key
Bodyapplication/json
orderobject
curl -i -X POST \
  https://mercately.shop/api/v1/orders \
  -H 'Content-Type: application/json' \
  -H 'api-key: YOUR_API_KEY_HERE' \
  -d '{
    "order": {
      "sales_channel": "string",
      "notes": "string",
      "address": "string",
      "city": "string",
      "state": "string",
      "zip_code": "string",
      "delivery_method": "send_order",
      "status": "pending",
      "shipping_value": 0.1,
      "customer_attributes": {
        "first_name": "string",
        "last_name": "string",
        "email": "string",
        "phone": "string"
      },
      "order_items_attributes": [
        {
          "product_id": "string",
          "quantity": 0,
          "unit_price": 0.1
        }
      ]
    }
  }'

Responses

Created

Bodyapplication/json
messagestring
orderobject
Response
{ "message": "Órden creada con éxito", "order": { "web_id": "aAKpT9laN5", "status": "pending", "subtotal": "400.0", "tax_amount": "0.0", "total": "405.0", "shipping_value": "5.0", "sales_channel": null, "notes": "New notes", "created_at": "2023-06-12T18:26:58.534Z", "archived": false, "customer": { … }, "order_items": [ … ] } }