v1

latestOpenAPI 3.1.02026-07-241040774.6 KB

Incluir item

Quando um pedido está aberto, você pode incluir itens nele.

post/orders/{order_id}/items

Path parameters

order_idstring required

Código do pedido.

Request body

amountinteger required

Valor do item.

codestring

Código do item no sistema da loja. Max: 52 caracteres. Obrigatório para transações de split

descriptionstring required

Descrição do item. Max: 256 caracteres.

quantityinteger required

Quantidade de itens.

categorystring

Categoria do item. Max: 64 caracteres.

Response

200

idstring
descriptionstring
amountinteger
quantityinteger
statusstring
created_atstring
updated_atstring

Example response

{
  "id": "oi_ZD2lNDKcORty1pzw",
  "description": "Caneca Zero Grau",
  "amount": 1090,
  "quantity": 1,
  "status": "active",
  "created_at": "2017-10-05T20:24:38Z",
  "updated_at": "2017-10-05T20:24:38Z",
  "order": {
    "id": "or_oO7vgpeh1rF4DX3A",
    "code": "7W86TKXIO1",
    "amount": 5170,
    "currency": "BRL",
    "status": "pending",
    "created_at": "2017-10-05T19:41:29Z",
    "updated_at": "2017-10-05T19:41:29Z"
  },
  "seller": {
    "id": "sl_jY3D2MziacQnR01W",
    "name": "Stark Industries",
    "code": "STRK_01",
    "document": "26224451990",
    "description": "Changing the world for a better future.",
    "status": "active",
    "created_at": "2017-10-05T20:24:38Z",
    "updated_at": "2017-10-05T20:24:38Z",
    "address": {
      "line_1": "10880, Malibu Point, Malibu Central",
      "zip_code": "90265",
      "city": "Malibu",
      "state": "CA",
      "country": "US"
    }
  }
}