Pedidos
Properties
- Name
id
- Type
- string
- Description
Identificador único do pedido, começando com
or_
.
- Name
code
- Type
- string
- Description
Código único do pedido.
- Name
customer
- Type
- object
- Description
Objeto contendo (id, name) do cliente.
- Name
billing_address
- Type
- string | null
- Description
Endereço de cobrança do cliente. Nulo caso não tenha sido informado.
- Name
shipping_address
- Type
- string | null
- Description
Endereço de envio. Nulo caso não tenha sido informado.
- Name
product
- Type
- object
- Description
Objeto contendo (id, name e image) do produto.
- Name
has_shipping
- Type
- boolean
- Description
Indica se o pedido possui frete.
- Name
grouped
- Type
- boolean
- Description
Indica se o pedido está agrupado com outros.
- Name
currency
- Type
- string
- Description
Código da moeda usada no pedido (ex.:
brl
).
- Name
amount
- Type
- number
- Description
Valor total do pedido em centavos.
- Name
item_amount
- Type
- number
- Description
Valor individual do item em centavos.
- Name
paid_amount
- Type
- number
- Description
Valor efetivamente pago em centavos.
- Name
shipping_amount
- Type
- number
- Description
Valor do frete em centavos.
- Name
status
- Type
- 'pending' | 'paid' | 'failed' | 'canceled' | 'in_review' | 'refunded'
- Description
Status atual do pedido.
- Name
type
- Type
- 'producer' | 'coproducer' | 'affiliate'
- Description
Tipo do participante relacionado ao pedido.
- Name
origin
- Type
- 'checkout' | 'bump' | 'upsell'
- Description
Origem do pedido (ex.:
checkout
).
- Name
refundable
- Type
- boolean
- Description
Indica se o pedido é reembolsável.
- Name
payment_method
- Type
- 'card' | 'boleto' | 'pix' | 'br_card'
- Description
Método de pagamento utilizado no pedido.
- Name
created_at
- Type
- number
- Description
Timestamp Unix indicando quando o pedido foi criado.
- Name
paid_at
- Type
- number | null
- Description
Timestamp Unix indicando quando o pedido foi pago, ou
null
se não foi pago.
- Name
boleto_url
- Type
- string | null
- Description
URL do boleto bancário, caso aplicável.
- Name
boleto_barcode
- Type
- string | null
- Description
Código de barras do boleto bancário, caso aplicável.
- Name
pix_qr_code
- Type
- string | null
- Description
Código QR para pagamentos via Pix, caso aplicável.
- Name
card_brand
- Type
- string | null
- Description
Bandeira do cartão usado no pagamento (ex.:
visa
).
- Name
card_last_digits
- Type
- string | null
- Description
Últimos 4 dígitos do cartão usado no pagamento.
- Name
installments
- Type
- number
- Description
Quantidade de parcelas no pagamento.
Listar pedidos
This endpoint allows you to retrieve a paginated list of all your contacts. By default, a maximum of ten contacts are shown per page.
Optional attributes
- Name
limit
- Type
- integer
- Description
Limita o número de produtos retornados.
- Name
page
- Type
- integer
- Description
Número da página a ser retornada.
Request
curl -G https://api.upag.io/api/v1/orders \
-H "Authorization: Bearer {token}" \
-d page=1 \
-d limit=10
Response
{
"data": [
{
"id": "or_MfaYZM5J7RKM6sWX",
"code": "SDGTDYFTUT",
"customer": {
"id": "cus_ahwDXrgYvur89iPs",
"name": "John Doe"
},
"billing_address": null,
"shipping_address": null,
"product": {
"id": "prod_Naa5NFeco9rGjxq6",
"name": "Upag T-shirt",
"image": "https://files.upag.dev/files/b97ae08a-c96b-401c-af82-5b45f82bf3b0.png"
},
"has_shipping": false,
"grouped": false,
"currency": "brl",
"amount": 415,
"item_amount": 1000,
"paid_amount": 1000,
"shipping_amount": 0,
"status": "paid",
"type": "coproducer",
"origin": "checkout",
"refundable": false,
"payment_method": "card",
"created_at": 1731622178441,
"paid_at": 1731622179870,
"boleto_url": null,
"boleto_barcode": null,
"pix_qr_code": null,
"card_brand": "visa",
"card_last_digits": "0010",
"installments": 1
}
],
"count": 1
}