Obter Venda
curl --request GET \
--url https://api.spedy.com.br/v1/orders/{id} \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.spedy.com.br/v1/orders/{id}"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.spedy.com.br/v1/orders/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.spedy.com.br/v1/orders/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.spedy.com.br/v1/orders/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.spedy.com.br/v1/orders/{id}")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spedy.com.br/v1/orders/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"transactionId": "<string>",
"date": "2023-11-07T05:31:56Z",
"customer": {
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"legalName": "<string>",
"federalTaxNumber": "<string>",
"cityTaxNumber": "<string>",
"stateTaxNumber": "<string>",
"email": "<string>",
"phone": "<string>",
"mobilePhone": "<string>",
"address": {
"street": "<string>",
"district": "<string>",
"postalCode": "<string>",
"number": "<string>",
"additionalInformation": "<string>",
"city": {
"code": "<string>",
"name": "<string>",
"state": "ro"
},
"country": {
"name": "<string>",
"code": 123
},
"cityName": "<string>"
}
},
"amount": 123,
"status": "created",
"sourcePlatform": "spedy",
"items": [
{
"quantity": 123,
"price": 123,
"amount": 123,
"product": {
"name": "<string>",
"code": "<string>",
"price": 123,
"profile": "producer",
"invoiceModel": "productInvoice"
},
"description": "<string>",
"discountAmount": 123,
"freightAmount": 123
}
],
"autoIssueMode": "disabled",
"paymentMethod": "billetBank",
"invoices": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "created",
"model": "productInvoice",
"processingDetail": {
"status": "processing",
"message": "<string>",
"code": "<string>",
"on": "2023-11-07T05:31:56Z"
}
}
]
}Vendas
Obter Venda
GET
/
v1
/
orders
/
{id}
Obter Venda
curl --request GET \
--url https://api.spedy.com.br/v1/orders/{id} \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.spedy.com.br/v1/orders/{id}"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.spedy.com.br/v1/orders/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.spedy.com.br/v1/orders/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.spedy.com.br/v1/orders/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.spedy.com.br/v1/orders/{id}")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spedy.com.br/v1/orders/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"transactionId": "<string>",
"date": "2023-11-07T05:31:56Z",
"customer": {
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"legalName": "<string>",
"federalTaxNumber": "<string>",
"cityTaxNumber": "<string>",
"stateTaxNumber": "<string>",
"email": "<string>",
"phone": "<string>",
"mobilePhone": "<string>",
"address": {
"street": "<string>",
"district": "<string>",
"postalCode": "<string>",
"number": "<string>",
"additionalInformation": "<string>",
"city": {
"code": "<string>",
"name": "<string>",
"state": "ro"
},
"country": {
"name": "<string>",
"code": 123
},
"cityName": "<string>"
}
},
"amount": 123,
"status": "created",
"sourcePlatform": "spedy",
"items": [
{
"quantity": 123,
"price": 123,
"amount": 123,
"product": {
"name": "<string>",
"code": "<string>",
"price": 123,
"profile": "producer",
"invoiceModel": "productInvoice"
},
"description": "<string>",
"discountAmount": 123,
"freightAmount": 123
}
],
"autoIssueMode": "disabled",
"paymentMethod": "billetBank",
"invoices": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "created",
"model": "productInvoice",
"processingDetail": {
"status": "processing",
"message": "<string>",
"code": "<string>",
"on": "2023-11-07T05:31:56Z"
}
}
]
}Authorizations
Authorization By X-Api-Key inside request's header
Path Parameters
Response
Success
ID da Venda
Código da Transação
Data da Venda
Cliente
Show child attributes
Show child attributes
Valor total
Situação da venda
Valores possíveis:
- created: Criado
- awaitingPayment: Aguardando pagamento
- approved: Aprovado
- refundRequested: Reembolso solicitado
- completed: Concluído
- chargeback: Chargeback
- canceled: Cancelado
- refunded: Reembolsado
- expired: Vencido
- refused: Recusado
- deleted: Deletado
Available options:
created, awaitingPayment, approved, refundRequested, completed, chargeback, canceled, refunded, expired, refused, deleted Plataforma
Valores possíveis:
- spedy: Spedy
- hotmart: Hotmart
- monetizze: Monetizze
- eduzz: Eduzz
- braip: Braip
- shopify: Shopify
- iugu: Iugu
- pagarme: Pagar.me
- kiwify: Kiwify
- mercadoPago: Mercado Pago
- yampi: Yampi
- nuvemshop: Nuvemshop
- cartpanda: Cartpanda
- stripe: Stripe
- perfectPay: PerfectPay
- evermart: Evermart
- cyclopay: Cyclopay
- greenn: Greenn
- woocommerce: WooCommerce
- afiliaPay: AfiliaPay
- blueticket: Blueticket
- abmex: Abmex
- asaas: Asaas
- doppus: Doppus
- dooca: Dooca
- vindi: Vindi
- guru: Guru
- ticto: Ticto
- eADPlataforma: EAD Plataforma
- provi: Provi
- blitzPay: BlitzPay
- payt: Payt
- eventiza: Eventiza
- pepper: Pepper
- appMax: AppMax
- voomp: Voomp
- xgrow: Xgrow
- kirvano: Kirvano
- theMart: The Mart
- hubla: Hubla
- payPal: PayPal
- tMB: TMB
- lastlink: Lastlink
- vega: Vega
- doppusV2: Doppus V2
- cakto: Cakto
- wix: Wix
- wBuy: WBuy
- pepperV2: Pepper V2
- neonPay: NeonPay
- assiny: Assiny
- pagTrust: PagTrust
- wiapy: Wiapy
- onProfit: OnProfit
- edunext: Edunext
- yampiV2: Yampi V2
- yever: Yever
- tikTokShop: TikTok Shop
- luna: Luna
- bilion: Bilion
- shopee: Shopee
- b4you: B4you
- vegaV2: Vega V2
- domPagamentos: Dom Pagamentos
- neofin: Neofin
- pagBank: PagBank
- lia: Lia
- yuno: Yuno
- theMembers: The Members
- digistore24: Digistore24
- heroSpark: HeroSpark
- woovi: Woovi
- zouti: Zouti
- eduzzV4: EduzzV4
- stripeV2: StripeV2
- shopeeAffiliate: Shopee Afiliados
- firePay: FirePay
- abacatePay: AbacatePay
- syncPay: SyncPay
Available options:
spedy, hotmart, monetizze, eduzz, braip, shopify, iugu, pagarme, kiwify, mercadoPago, yampi, nuvemshop, cartpanda, stripe, perfectPay, evermart, cyclopay, greenn, woocommerce, afiliaPay, blueticket, abmex, asaas, doppus, dooca, vindi, guru, ticto, eadPlataforma, provi, blitzPay, payt, eventiza, pepper, appMax, voomp, xgrow, kirvano, theMart, hubla, payPal, tmb, lastlink, vega, doppusV2, cakto, wix, wBuy, pepperV2, neonPay, assiny, pagTrust, wiapy, onProfit, edunext, yampiV2, yever, tikTokShop, luna, bilion, shopee, b4you, vegaV2, domPagamentos, neofin, pagBank, lia, yuno, theMembers, digistore24, heroSpark, woovi, zouti, eduzzV4, stripeV2, shopeeAffiliate, firePay, abacatePay, syncPay Items da venda
Show child attributes
Show child attributes
Modo de emissão automática
Valores possíveis:
- disabled: Desativado (Manual)
- immediately: Imediatamente (default)
- afterPayment: Após o pagamento
- afterWarrency: Após a garantia
Available options:
disabled, immediately, afterPayment, afterWarrency Forma de pagamento
Valores possíveis:
- billetBank: Boleto
- creditCard: Cartão de Crédito
- debitCard: Cartão de Débito
- pix: PIX
- paypal: Paypal
- bankTransfer: Transferência Bancária
- balanceWallets: Saldo da Carteira
- other: Outro
- cash: Dinheiro
Available options:
billetBank, creditCard, debitCard, pix, paypal, bankTransfer, balanceWallets, other, cash Notas fiscais
Show child attributes
Show child attributes