⚡
Zydon
Uptime serviços Zydon
  • Bem-vindo à Zydon
  • Quickstart
    • Chaves de acesso
    • Autenticação
  • Cadastros Gerais
    • Profiles
      • Import
      • Get import spreadsheet
    • Sellers
      • Enable
      • Disable
      • Import
      • Get import spreadsheet
      • Partners
    • Companies
      • Import
      • Get import spreadsheet
    • Resource files
      • Details
    • Partners
      • Sellers
        • Import
        • Get import spreadsheet
      • Contact
      • Address
        • Import
        • Get import spreadsheet
      • Enable
      • Disable
      • Query
      • Import
      • Get import spreadsheet
      • Analysis
  • Produtos
    • Products
      • Variations
        • Import
        • Get import spreadsheet
      • Specification
        • Import
        • Get import spreadsheet
      • Images
      • Enable
      • Disable
      • Alternative units
        • Import
        • Get import spreadsheet
      • Search
        • Synchronize
        • Status
      • Main images
      • Import
      • Get import spreadsheet
      • Generate sku code
      • Similar
      • Recommended
      • Image
      • Analysis
        • Most sold
        • Highlight
    • Prices
      • Product
        • Calculate
    • Stock
      • Enable
      • Disable
      • Override
      • Movement
      • Query
    • Discounts
      • Products
    • Price tables
      • Copy
      • Products
    • Warehouses
      • Import
      • Get import spreadsheet
    • Brands
      • Enable
      • Disable
      • Import
      • Get import spreadsheet
      • Image
    • Categories
      • Order
      • Enable
      • Disable
      • Specification
        • Import
        • Get import spreadsheet
      • Import
      • Get import spreadsheet
      • Image
      • Has products
      • Tree
    • Variations
      • Values
      • Import
      • Get import spreadsheet
    • Measure units
      • Enable
      • Disable
      • Import
      • Get import spreadsheet
      • Description
    • Portal User Search
      • User
        • Search
  • Pedidos
    • Payment groups
    • Orders
      • Items
        • Import
        • Get import spreadsheet
      • Payments
        • Import
        • Get import spreadsheet
      • Joint
      • Attachments
      • Report
      • Invoices
      • Import
      • Get import spreadsheet
      • Status
      • Summary
    • Payment methods
      • Enable
      • Disable
      • Query
      • Import
      • Get import spreadsheet
    • Status
    • Coupons
      • Manual
      • Automatic
    • Sales
      • Statuses
        • Available
  • Financeiro
    • Financials
      • Attachments
      • Import
      • Get import spreadsheet
      • Order
  • Webhooks
    • Sincronização de dados
    • Envio de Pedido
    • Cadastro de Parceiro
  • About
  • API reference
    • Warehouses
      • Import
      • Get import spreadsheet
    • Variations
      • Values
      • Import
      • Get import spreadsheet
    • Status
    • Sellers
      • Enable
      • Disable
      • Import
      • Get import spreadsheet
      • Partners
    • Profiles
      • Import
      • Get import spreadsheet
    • Products
      • Variations
        • Import
        • Get import spreadsheet
      • Specification
        • Import
        • Get import spreadsheet
      • Images
      • Enable
      • Disable
      • Alternative units
        • Import
        • Get import spreadsheet
      • Search
        • Synchronize
        • Status
      • Main images
      • Import
      • Get import spreadsheet
      • Generate sku code
      • Similar
      • Recommended
      • Image
      • Analysis
        • Most sold
        • Highlight
    • Price tables
      • Copy
      • Products
    • Payment methods
      • Enable
      • Disable
      • Query
      • Import
      • Get import spreadsheet
    • Payment groups
    • Partners
      • Sellers
        • Import
        • Get import spreadsheet
      • Contact
      • Address
        • Import
        • Get import spreadsheet
      • Enable
      • Disable
      • Query
      • Import
      • Get import spreadsheet
      • Analysis
    • Orders
      • Items
        • Import
        • Get import spreadsheet
      • Payments
        • Import
        • Get import spreadsheet
      • Joint
      • Attachments
      • Report
      • Invoices
      • Import
      • Get import spreadsheet
      • Status
      • Summary
    • Measure units
      • Enable
      • Disable
      • Import
      • Get import spreadsheet
      • Description
    • Financials
      • Attachments
      • Import
      • Get import spreadsheet
      • Order
    • Discounts
      • Products
    • Coupons
      • Manual
      • Automatic
    • Companies
      • Import
      • Get import spreadsheet
    • Categories
      • Order
      • Enable
      • Disable
      • Specification
        • Import
        • Get import spreadsheet
      • Import
      • Get import spreadsheet
      • Image
      • Has products
      • Tree
    • Brands
      • Enable
      • Disable
      • Import
      • Get import spreadsheet
      • Image
    • Sales
      • Statuses
        • Available
    • Resource files
      • Details
    • Stock
      • Enable
      • Disable
      • Override
      • Movement
      • Query
    • Sales funnel
    • Template
      • Validate
      • Install
      • Export
    • Home
      • Sales
      • Sales by period
      • Products
      • Users
    • Prices
      • Product
        • Calculate
  • Specification
  • About
  • Specification
Fornecido por GitBook
Nesta página
  1. Webhooks

Envio de Pedido

Atualizado há 7 meses

Para configurar o webhook para o envio de pedidos ao seu sistema, acesse o menu "B2B", clique em "Editar Portal" e selecione o perfil que deseja configurar. Ao selecionar clique em “Configurações”.

Para configurar as informações que devem ser enviadas para a persistência do pedido, acesse a aba "Entrada de Pedido". Esses dados serão incluídos no corpo da requisição de envio do pedido.

Objeto enviado no evento:

{
    "amount_value": 1864.83,
    "automation_fields": { //campos configurados para serem enviados
        "AD_OBJETIVODECOMPRA": "CON",
        "AD_OPCFRETE": "1",
        "AD_ORIGEM": "B2B",
        "CODTIPOPER": "4502"
    },
    "checkout_complement": { //informações do formulário de checkout
        "3e53f947-713a-4bf2-ae2e-d8e12db4cce4": "C",
        "4d581464-6414-48b4-b854-a04851d56c5e": "asd",
        "879b22f0-d8ca-491e-8532-0d6cd1881acb": "CON",
        "a1ebb794-84dd-4931-ba56-5f1886d161da": "1"
    },
    "delivery": {
        "address_type": "Av",
        "complement": "BLOCO B",
        "contact_name": "EXEMPLO",
        "contact_number": 34  99999999",
        "country": "Brasil",
        "neighborhood": "Cidade Jardim",
        "number": "799",
        "postal_code": "38412166",
        "state": "MG",
        "street": "Av. Uirapuru"
    },
    "discount": [
        {
            "amount": 0
        }
    ],
    "discount_value": 0,
    "freight": {
        "amount": 0
    },
    "items": [
       
        {
            "amount": 245.73,
            "automation_fields": { //campos configurados para serem enviados
                "CODLOCALORIG": "3030100"
            },
            "discount": 0.0,
            "product_id": "20031",
            "quantity": 3,
            "total_value": 245.73,
            "unit": "un",
            "unit_value": 81.91
        },
        …
        
    ],
    "partner_id": "4337",
    "payments": [
        {
            "payment_method_id": "64"
        }
    ],
    "resume_fields": [ // campos para serem exibidos no resumo do pedido
        "VLRPIS",
        "VLRISS",
        "VLRJURO",
        "VLRPISST",
        "VLRCOFINS",
        "AD_VALORDESONICMS",
        "AD_DIASENT",
        "VLROUTROS",
        "VLRFRETE",
       
    ],
    "total_value": 1864.83
}

Objeto de retorno esperado:

@Data public class CreateOrderResponse { 
  private String id; 
  private BigDecimal total_value; 
  private List<CreateOrderItemResponse> items; 
}
@Data @AllArgsConstructor 
public class CreateOrderItemResponse { 
	private String product_id; 
	private BigDecimal quantity; 
	private String unit; 
	private BigDecimal unit_value; 
	private BigDecimal discount; 
	private BigDecimal total_value;
}

Exemplo de resposta:

{
	"resume_fields": [
		{
			"key": "VLRPIS",
			"description": "Vlr. PIS"
		},
		{
			"key": "VLRISS",
			"description": "Vlr. do ISS",
			"value": 0
		},
		{
			"key": "VLRJURO",
			"description": "Vlr. do Juro",
			"value": 0
		},
               …			
      ],
	"id": "9999999760",
	"total_value": 1864.83,
	"items": [
		{
			"product_id": "20031",
			"quantity": 3,
			"unit": "UN",
			"unit_value": 81.91,
			"discount": 0,
			"total_value": 245.73
		},
             …
	]
}