Obter pedido

get
https://api.stone.com.br/core/v5/orders/{order_id}

Path Parameters

order_idstringrequired

Código identificador do pedido no sistema da loja. Max: 52 caracteres.

Response

application/json

200

One Of
idstring

Example:or_28dN9w7CLU79kDjL

codestring

Example:62LVFN7I4R

amountinteger

Default:0

Example:2990

currencystring

Example:BRL

closedboolean

Default:true

Example:true

itemsarray[object]
Show Child Parameters
customerobject
Show Child Parameters
statusstring

Example:paid

created_atstring

Example:2017-04-19T16:01:09Z

updated_atstring

Example:2017-04-19T16:01:11Z

closed_atstring

Example:2017-04-19T16:01:11Z

chargesarray[object]
Show Child Parameters
get/orders/{order_id}
 
application/json

Fechar um pedido

Utilizado para fechar um pedido para que não seja mais possível adicionar cobranças.

patch
https://api.stone.com.br/core/v5/orders/{order_id}/closed

Path Parameters

order_idstringrequired

Código do pedido.

Body

application/json
statusstringrequired

Status final do pedido. Valores possíveis: paid, canceled ou failed. Caso não enviado, valor default será paid.

Response

application/json

200

idstring

Example:or_koMvlQOTMCb9dpPO

codestring

Example:O8YDFPZUM3

amountinteger

Default:0

Example:2990

currencystring

Example:BRL

closedboolean

Default:true

Example:true

itemsarray[object]
Show Child Parameters
customerobject
Show Child Parameters
statusstring

Example:paid

created_atstring

Example:2017-06-06T16:03:40Z

updated_atstring

Example:2017-06-06T16:03:40Z

closed_atstring

Example:2017-06-06T16:03:47Z

patch/orders/{order_id}/closed

Body

{ "status": "status" }
 
application/json

Incluir item

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

post
https://api.stone.com.br/core/v5/orders/{order_id}/items

Path Parameters

order_idstringrequired

Código do pedido.

Body

application/json
amountinteger(int32)required

Valor do item.

codestring

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

descriptionstringrequired

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

quantitystringrequired

Quantidade de itens.

categorystring

Categoria do item. Max: 64 caracteres.

Response

application/json

200

idstring

Example:oi_ZD2lNDKcORty1pzw

descriptionstring

Example:Caneca Zero Grau

amountinteger

Default:0

Example:1090

quantityinteger

Default:0

Example:1

statusstring

Example:active

created_atstring

Example:2017-10-05T20:24:38Z

updated_atstring

Example:2017-10-05T20:24:38Z

orderobject
Show Child Parameters
sellerobject
Show Child Parameters
post/orders/{order_id}/items

Body

{ "amount": 1090, "description": "Caneca Zero Grau", "quantity": 1, "seller": { "document": "26224451990", "name": "Stark Industries", "code": "STRK_01", "description": "Changing the world for a better future.", "address": { "line_1": "10880, Malibu Point, Malibu Central", "zip_code": "90265", "city": "Malibu", "state": "CA", "country": "US" } } }
 
application/json

Remover todos os itens

Quando um pedido está aberto, você pode remover todos os itens dele.

delete
https://api.stone.com.br/core/v5/orders/{order_id}/items

Path Parameters

order_idstringrequired

Código do pedido.

Response

application/json

200

idstring

Example:or_5OKyl9fNwIKDzjWJ

codestring

Example:7P03S0FOQN

currencystring

Example:BRL

closedboolean

Default:true

customerobject
Show Child Parameters
statusstring

Example:pending

created_atstring

Example:2017-04-05T03:54:42

updated_atstring

Example:2017-04-05T03:54:42

delete/orders/{order_id}/items
 
application/json

Editar item do pedido

Quando um pedido está aberto, você pode editar os itens dele.

put
https://api.stone.com.br/core/v5/orders/{order_id}/items/{item_id}

Path Parameters

order_idstringrequired

Código do pedido

item_idstringrequired

Código do item do pedido

Body

application/json
amountinteger(int32)required

Valor do item.

descriptionstringrequired

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

quantityinteger(int32)required

Quantidade de itens.

categorystring

Categoria do item. Max: 64 caracteres.

Response

application/json

200

idstring

Example:oi_AQKqAnGhQGsYd1b6

descriptionstring

Example:Água com gás

amountinteger

Default:0

Example:1090

quantityinteger

Default:0

Example:2

statusstring

Example:active

created_atstring

Example:2017-04-05T03:55:48

updated_atstring

Example:2017-04-05T05:05:14

orderobject
Show Child Parameters
put/orders/{order_id}/items/{item_id}

Body

{ "amount": 1090, "description": "Água com gás", "quantity": 2 }
 
application/json