Alterar status
curl --request PUT \
--url https://api.spedy.com.br/v1/orders/{id}/status \
--header 'Content-Type: application/json-patch+json' \
--header 'X-Api-Key: <api-key>' \
--data '{}'import requests
url = "https://api.spedy.com.br/v1/orders/{id}/status"
payload = {}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json-patch+json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({})
};
fetch('https://api.spedy.com.br/v1/orders/{id}/status', 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}/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json-patch+json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.spedy.com.br/v1/orders/{id}/status"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json-patch+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.spedy.com.br/v1/orders/{id}/status")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json-patch+json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spedy.com.br/v1/orders/{id}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json-patch+json'
request.body = "{}"
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
Alterar status
Atualiza o status da venda (ex.: marcar como paga). Isso pode disparar a emissão automática da nota
quando o autoIssueMode da venda depende do pagamento (ex.: afterPayment).
PUT
/
v1
/
orders
/
{id}
/
status
Alterar status
curl --request PUT \
--url https://api.spedy.com.br/v1/orders/{id}/status \
--header 'Content-Type: application/json-patch+json' \
--header 'X-Api-Key: <api-key>' \
--data '{}'import requests
url = "https://api.spedy.com.br/v1/orders/{id}/status"
payload = {}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json-patch+json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({})
};
fetch('https://api.spedy.com.br/v1/orders/{id}/status', 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}/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json-patch+json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.spedy.com.br/v1/orders/{id}/status"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json-patch+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.spedy.com.br/v1/orders/{id}/status")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json-patch+json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spedy.com.br/v1/orders/{id}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json-patch+json'
request.body = "{}"
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
Body
application/json-patch+jsonapplication/jsontext/jsonapplication/*+json
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 Response
OK
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