Create an order (widget)

POST /widget/orders

will create and assign an order

application/json

Body

  • id_popliste integer
  • order_id string Required
  • source string Required
  • total_amount number Required
  • products array[object] Required
    Hide products attributes Show products attributes object
    • id_product string
    • price number
    • name string
    • qty number
  • id_affiliate integer
  • id_ambassador_post integer
  • order_status string
  • total_ws number
  • order_type string

Responses

  • 201 application/json

    Order created successfully

    Hide response attributes Show response attributes object
    • id_order integer(int32)
    • id_order_external string(nullable)
    • total_amount number(float)
    • total_paid number(float)
    • total_ws number(float)
    • id_popliste integer(int32)
    • source string
    • last_status string
    • id_meeting integer(int32)
    • id_meeting_external string(nullable)
    • customer_id string
    • order_info string
    • currency string
    • date_order string
    • type string
    • id_chat_segment integer(int32)
    • id_chatroom integer(int32)
    • date_insert string
    • date_update string
    • assignment string

      Values are conversation_assigned, affiliation_assigned, or unassigned.

  • 401 application/json

    Unauthorized.

    Hide response attribute Show response attribute object
    • message string
  • 403

    Forbidden - You don't have permission to access this route

  • 409

    Conflict - The order already exists

  • 422 application/json

    Unprocessable Content

    Hide response attributes Show response attributes object
    • message string

      Error message.

    • errors object
      Hide errors attributes Show errors attributes object
      • field array[string]

        Error message details.

      • * array[string] Additional properties

        Error message details.

POST /widget/orders
curl \
 --request POST 'https://domain.tld/api/v2/widget/orders' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"id_popliste":42,"order_id":"string","source":"string","total_amount":42.0,"products":[{"id_product":"string","price":42.0,"name":"string","qty":42.0}],"id_affiliate":42,"id_ambassador_post":42,"order_status":"string","total_ws":42.0,"order_type":"string"}'
Request examples
{
  "id_popliste": 42,
  "order_id": "string",
  "source": "string",
  "total_amount": 42.0,
  "products": [
    {
      "id_product": "string",
      "price": 42.0,
      "name": "string",
      "qty": 42.0
    }
  ],
  "id_affiliate": 42,
  "id_ambassador_post": 42,
  "order_status": "string",
  "total_ws": 42.0,
  "order_type": "string"
}
Response examples (201)
{
  "id_order": 42,
  "id_order_external": "string",
  "total_amount": 42.0,
  "total_paid": 42.0,
  "total_ws": 42.0,
  "id_popliste": 42,
  "source": "string",
  "last_status": "string",
  "id_meeting": 42,
  "id_meeting_external": "string",
  "customer_id": "string",
  "order_info": "string",
  "currency": "string",
  "date_order": "string",
  "type": "string",
  "id_chat_segment": 42,
  "id_chatroom": 42,
  "date_insert": "string",
  "date_update": "string",
  "assignment": "conversation_assigned"
}
Response examples (401)
{
  "message": "Unauthorized."
}
Response examples (422)
{
  "message": "field is required! (and 3 more error)",
  "errors": {
    "field": [
      "Error message details here"
    ],
    "additionalProperty1": [
      "Error message details here"
    ],
    "additionalProperty2": [
      "Error message details here"
    ]
  }
}