Troquecommerce - ReverseLogistic
Eventos da família reverse_logistic.* na integração Troquecommerce.
Eventos Disponíveis
reverse_logistic.return_under_reviewreverse_logistic.return_approvedreverse_logistic.return_canceledreverse_logistic.refundedreverse_logistic.voucher_generatedreverse_logistic.exchange_reservedreverse_logistic.exchange_approvedreverse_logistic.return_deliveredreverse_logistic.return_in_transit
Estrutura do Payload
{ "event": "reverse_logistic.return_approved", "customer": { "id": null, "name": "João Silva", "document": "12345678900", "phone_numbers": [ { "formatted_phone": "11999999999", "type": null, "raw_number": "11999999999", "area_code": null, "international_dialing_code": null } ], "address": { "street": "Rua Example", "number": "123", "complement": "Apto 1", "neighborhood": "Bairro", "city": "São Paulo", "state": "SP", "country": "BR", "postal_code": "01234567" } }, "reverse_payment": { "currency": "BRL", "total": 10000, "refund": 10000, "exchange": null, "coupons": [], "reverse_payment_method": { "type": "pix", "qrcode_url": null, "qrcode_signature": null, "expiration_date": null, "pix_key_type": "email" } }, "product": { "id": "SKU-001", "name": "Produto Exemplo", "quantity": 1, "unit_value": 10000, "total_value": 10000, "image_url": "https://example.com/produto.jpg", "type": "product", "offer_type": "main" }, "shipping": { "carrier": "Correios", "total_value": 0, "tracking_url": "https://rastreio.correios.com.br/AB123456789BR", "tracking_code": "AB123456789BR", "method": "Correios", "delivery_address": { "street": "Rua Example", "number": "123", "complement": "Apto 1", "neighborhood": "Bairro", "city": "São Paulo", "state": "SP", "country": "BR", "postal_code": "01234567" }, "estimated_delivery_date": null, "estimated_delivery_time_in_days": null, "status": "fulfilled" }}Componentes do Payload
Customer
| Campo | Tipo | Descrição |
|---|---|---|
id | null | Sempre null |
name | string | null | Nome do cliente |
document | string | null | Número do documento (CPF/CNPJ) |
email | string | null | Email do cliente |
phoneNumbers | Collection | Coleção de telefones |
address | CustomerAddress | Endereço do cliente |
Subcomponentes
| Campo | Tipo | Descrição |
|---|---|---|
street | string | null | Nome da rua |
number | string | null | Número |
complement | string | null | Complemento |
neighborhood | string | null | Bairro |
city | string | null | Cidade |
state | string | null | Estado (UF) |
country | string | null | País |
postalCode | string | null | CEP |
Telefones
| Campo | Tipo | Descrição |
|---|---|---|
formattedPhone | PhoneFactory | null | Telefone formatado |
type | null | Sempre null |
rawNumber | string | null | Número bruto |
areaCode | null | Sempre null |
internationalDialingCode | null | Sempre null |
Product
| Campo | Tipo | Descrição |
|---|---|---|
id | string | null | ID do produto (sku ou ecommerce_product_id) |
name | string | null | Nome do produto |
quantity | int | null | Quantidade |
unitValue | int | null | Valor unitário em centavos |
totalValue | int | null | Valor total |
imageUrl | string | null | URL da imagem do produto |
type | string | Sempre product |
offerType | string | Sempre main |
ReversePayment
| Campo | Tipo | Descrição |
|---|---|---|
currency | string | Currency | Sempre BRL |
total | int | null | Valor total |
refund | int | null | Valor do reembolso |
exchange | int | null | Valor da troca |
coupons | Collection | Coleção de cupons |
reversePaymentMethod | PaymentMethod | null | Método de pagamento do reembolso |
Métodos de Reembolso
| Campo | Tipo | Descrição |
|---|---|---|
brand | null | Sempre null |
lastDigits | null | Sempre null |
expirationMonth | null | Sempre null |
expirationYear | null | Sempre null |
| Campo | Tipo | Descrição |
|---|---|---|
qrcodeUrl | null | Sempre null |
qrcodeSignature | null | Sempre null |
expirationDate | null | Sempre null |
pixKey | string | null | Chave Pix |
pixKeyType | PixKeyType | null | Tipo da chave Pix |
Este método de pagamento não expõe campos específicos.
Cupom
| Campo | Tipo | Descrição |
|---|---|---|
id | string | null | ID do cupom |
code | string | null | Código do cupom |
value | int | null | Valor do cupom em centavos |
percentage | null | Sempre null |
incidence | null | Sempre null |
incidenceType | null | Sempre null |
expirationDate | Carbon | null | Data de expiração |
Shipping
| Campo | Tipo | Descrição |
|---|---|---|
carrier | string | null | Nome da transportadora |
totalValue | int | null | Valor do frete |
trackingUrl | string | null | URL de rastreamento |
trackingCode | string | null | Código de rastreamento |
method | string | null | Método de envio |
deliveryAddress | TrackingAddress | Endereço de entrega/rastreamento |
estimatedDeliveryDate | Carbon | null | Data estimada de entrega |
estimatedDeliveryTimeInDays | null | Sempre null |
status | ShippingStatus | null | Status do envio |
Status Normalizados (ShippingStatus)
A Troquecommerce retorna os seguintes valores normalizados para o status do envio:
| Valor | Descrição |
|---|---|
delivered | Entregue |
fulfilled | Coletado/Enviado |
waiting_postage | Aguardando postagem |
canceled | Cancelado |
| Campo | Tipo | Descrição |
|---|---|---|
street | string | null | Nome da rua |
number | string | null | Número |
complement | string | null | Complemento |
neighborhood | string | null | Bairro |
city | string | null | Cidade |
state | string | null | Estado (UF) |
country | string | null | País |
postalCode | string | null | CEP |