NicoChatNicoChatDocumentaçãoBuscar na documentação…
Entrar

WooCommerce

WooCommerce é um plugin de comércio eletrônico de código aberto para WordPress. Ele foi projetado para comerciantes online de pequeno e grande porte que usam WordPress. O plugin ganhou popularidade rapidamente pela facilidade de instalar e personalizar e pela posição de mercado do produto base, distribuído gratuitamente.

2026-08-12

O WooCommerce é hoje uma das principais opções para quem tem ou quer abrir uma loja online e atender os pedidos por ela.

O NicoChat oferece suporte nativo à integração com o WooCommerce, junto com todas as ações que a API atual do WooCommerce suporta em seus endpoints.

Com o NicoChat, você não só cria automações para sua loja WooCommerce como também cria, edita e atualiza pedidos, faz o atendimento deles e acompanha pedidos, remessas, avaliações etc.

Integrando sua loja WooCommerce com o NicoChat

Para integrar o NicoChat à sua loja WooCommerce, faça login na loja e clique na guia WooCommerce.

Clique em Configurações > Avançado > guia REST API

Clique em Adicionar chave

Insira os detalhes e crie sua chave API.

Salve e copie os detalhes.

No NicoChat, clique na aba Integrações e depois em WooCommerce para integrar sua loja.

Usando ações WooCommerce

Para usar as ações do WooCommerce, crie um bloco de ação, clique em Integrações e escolha a guia WooCommerce.

Ações nativas do WooCommerce

O WooCommerce oferece suporte às seguintes ações dos seus endpoints de API.

Vamos agora explorar cada uma delas em detalhes.

Adicionar ao carrinho

Esta ação é usada para adicionar um item ou produto ao carrinho do usuário.

O payload de resposta recebido é o seguinte:

{
"variant_id": 4120,
"product_id": 375,
"quantity": 1,
"previous_quantity": 0
}
{
"variant_id": 4120,
"product_id": 375,
"quantity": 1,
"previous_quantity": 0
}

Remover carrinho por variante

Esta ação é usada para remover um item ou produto do carrinho usando sua variante e ID do produto.

O payload de resposta recebido é o seguinte:

{
"variant_id": 4120,
"product_id": 375,
"quantity": 1,
"previous_quantity": 3
}
{
"variant_id": 4120,
"product_id": 375,
"quantity": 1,
"previous_quantity": 3
}

Remover carrinho por produto

Esta ação é usada para remover um item ou produto do carrinho usando apenas o ID do produto.

O payload de resposta recebido é o seguinte:

{
"product_id": 375,
"removed_variants": [
{
"variant_id": 4120,
"quantity": 1
}
]
}
{
"product_id": 375,
"removed_variants": [
{
"variant_id": 4120,
"quantity": 1
}
]
}

Esvaziar carrinho

Esta ação é usada para esvaziar o carrinho completo.

O payload de resposta recebido é o seguinte:

{
"status": "ok"
}
{
"status": "ok"
}

Obter itens do carrinho

Esta ação é usada para buscar todos os detalhes dos itens presentes no carrinho.

O payload de resposta recebido é o seguinte:

[
{
"id": 258,
"name": "Sapatos Pretos DNK - azul",
"product_id": 375,
"variation_id": 4120,
"quantity": 2,
"subtotal": "350.00",
"subtotal_tax": "0.00",
"total": "350.00",
"total_tax": "0.00",
"sku": "",
"price": 175,
"image": "https://shop.businessautomated.io/wp- content/uploads/2021/03/sports-shoe5.jpg",
"parent_name": "DNK Black Shoes"
}
]
[
{
"id": 258,
"name": "Sapatos Pretos DNK - azul",
"product_id": 375,
"variation_id": 4120,
"quantity": 2,
"subtotal": "350.00",
"subtotal_tax": "0.00",
"total": "350.00",
"total_tax": "0.00",
"sku": "",
"price": 175,
"image": "https://shop.businessautomated.io/wp- content/uploads/2021/03/sports-shoe5.jpg",
"parent_name": "DNK Black Shoes"
}
]

Obter IDs e quantidade dos itens do carrinho

Esta ação é usada para obter os IDs e a quantidade dos itens que estão presentes no carrinho.

O payload de resposta recebido é o seguinte:

[
{
"product_id": 375,
"quantity": 2,
"variation_id": 4120
}
]
[
{
"product_id": 375,
"quantity": 2,
"variation_id": 4120
}
]

Criar pedido do carrinho

Esta ação é usada para criar um pedido usando itens do carrinho.

O payload de resposta recebido é o seguinte:

{
"id": 4597,
"parent_id": 0,
"status": "pending",
"currency": "AUD",
"version": "6.9.4",
"prices_include_tax": false,
"date_created": "2023-04-14T11:01:51",
"date_modified": "2023-04-14T11:01:51",
"discount_total": "0.00",
"discount_tax": "0.00",
"shipping_total": "0.00",
"shipping_tax": "0.00",
"cart_tax": "0.00",
"total": "350.00",
"total_tax": "0.00",
"customer_id": 0,
"order_key": "wc_order_5hKQmDkxUiesi",
"billing": {
"first_name": "Hammad",
"last_name": "Siddiqui",
"company": "",
"address_1": "ABC Road, Garden City",
"address_2": "",
"city": "Karachi ",
"state": "Sindh",
"postcode": "",
"country": "Paquistão",
"email": "hammadsiddiqui788@gmail.com",
"phone": "+9230302320964"
},
"shipping": {
"first_name": "Hammad",
"last_name": "Siddiqui",
"company": "",
"address_1": "ABC Road, Garden City",
"address_2": "",
"city": "Karachi ",
"state": "Sindh",
"postcode": "",
"country": "Paquistão",
"phone":""
},
"payment_method": "",
"payment_method_title": "",
"transaction_id": "",
"customer_ip_address": "",
"customer_user_agent": "",
"created_via": "rest-api",
"customer_note": "",
"date_completed": null,
"date_paid": null,
"cart_hash": "",
"number": "4597",
"meta_data": [
{
"id": 6465,
"key": "user_ns",
"value": "f12372u15376836"
}
],
"line_items": [
{
"id": 259,
"name": "Sapatos pretos DNK - azul",
"product_id": 375,
"variation_id": 4120,
"quantity": 2,
"tax_class": "",
"subtotal": "350.00",
"subtotal_tax": "0.00",
"total": "350.00",
"total_tax": "0.00",
"taxes": [...], // 0 itens
"meta_data": [...], // 1 item
"sku": "",
"price": 175,
"image": {...}, // 2 chaves
"parent_name": "DNK Black Shoes"
}
],
"tax_lines": [
],
"shipping_lines": [
],
"fee_lines": [
],
"coupon_lines": [
],
"refunds": [
],
"payment_url": "https://shop.businessautomated.io/checkout-2/order-pay/4597?pay_for_order=true&key =wc_order_5hKQmDkxUiesi",
"is_editable": true,
"needs_payment": true,
"needs_processing": true,
"date_created_gmt": "2023-04-14T11:01:51",
"date_modified_gmt": "2023-04-14T11:01:51",
"date_completed_gmt": null,
"date_paid_gmt": null,
"currency_symbol": "$"
}
{
"id": 4597,
"parent_id": 0,
"status": "pending",
"currency": "AUD",
"version": "6.9.4",
"prices_include_tax": false,
"date_created": "2023-04-14T11:01:51",
"date_modified": "2023-04-14T11:01:51",
"discount_total": "0.00",
"discount_tax": "0.00",
"shipping_total": "0.00",
"shipping_tax": "0.00",
"cart_tax": "0.00",
"total": "350.00",
"total_tax": "0.00",
"customer_id": 0,
"order_key": "wc_order_5hKQmDkxUiesi",
"billing": {
"first_name": "Hammad",
"last_name": "Siddiqui",
"company": "",
"address_1": "ABC Road, Garden City",
"address_2": "",
"city": "Karachi ",
"state": "Sindh",
"postcode": "",
"country": "Paquistão",
"email": "hammadsiddiqui788@gmail.com",
"phone": "+9230302320964"
},
"shipping": {
"first_name": "Hammad",
"last_name": "Siddiqui",
"company": "",
"address_1": "ABC Road, Garden City",
"address_2": "",
"city": "Karachi ",
"state": "Sindh",
"postcode": "",
"country": "Paquistão",
"phone":""
},
"payment_method": "",
"payment_method_title": "",
"transaction_id": "",
"customer_ip_address": "",
"customer_user_agent": "",
"created_via": "rest-api",
"customer_note": "",
"date_completed": null,
"date_paid": null,
"cart_hash": "",
"number": "4597",
"meta_data": [
{
"id": 6465,
"key": "user_ns",
"value": "f12372u15376836"
}
],
"line_items": [
{
"id": 259,
"name": "Sapatos pretos DNK - azul",
"product_id": 375,
"variation_id": 4120,
"quantity": 2,
"tax_class": "",
"subtotal": "350.00",
"subtotal_tax": "0.00",
"total": "350.00",
"total_tax": "0.00",
"taxes": [...], // 0 itens
"meta_data": [...], // 1 item
"sku": "",
"price": 175,
"image": {...}, // 2 chaves
"parent_name": "DNK Black Shoes"
}
],
"tax_lines": [
],
"shipping_lines": [
],
"fee_lines": [
],
"coupon_lines": [
],
"refunds": [
],
"payment_url": "https://shop.businessautomated.io/checkout-2/order-pay/4597?pay_for_order=true&key =wc_order_5hKQmDkxUiesi",
"is_editable": true,
"needs_payment": true,
"needs_processing": true,
"date_created_gmt": "2023-04-14T11:01:51",
"date_modified_gmt": "2023-04-14T11:01:51",
"date_completed_gmt": null,
"date_paid_gmt": null,
"currency_symbol": "$"
}

Pesquisar cupons

Esta ação é usada para pesquisar os cupons disponíveis na sua loja WooCommerce com diversos parâmetros e consultas.

O payload de resposta recebido é o seguinte:

[
{
"id": 4592,
"code": "vipdiscount60fc",
"amount": "10.00",
"status": "publish",
"date_created": "2023-01-25T06:56:57",
"date_created_gmt": "2023-01-25T06:56:57",
"date_modified": "2023-01-25T06:56:57",
"date_modified_gmt": "2023-01-25T06:56:57",
"discount_type": "percent",
"description": "10% de desconto em todo o pedido, uso único",
"date_expires": null,
"date_expires_gmt": null,
"usage_count": 1,
"individual_use": false,
"product_ids": [
],
"excluded_product_ids": [
],
"usage_limit": 1,
"usage_limit_per_user": 1,
"limit_usage_to_x_items": null,
"free_shipping": false,
"product_categories": [
],
"excluded_product_categories": [
],
"exclude_sale_items": false,
"minimum_amount": "0.00",
"maximum_amount": "0.00",
"email_restrictions": [
],
"used_by": [
"mark@doe.com"
],
"meta_data": [
],
"_links": {
"self": [...], // 1 item
"collection": [...] // 1 item
}
}
]
[
{
"id": 4592,
"code": "vipdiscount60fc",
"amount": "10.00",
"status": "publish",
"date_created": "2023-01-25T06:56:57",
"date_created_gmt": "2023-01-25T06:56:57",
"date_modified": "2023-01-25T06:56:57",
"date_modified_gmt": "2023-01-25T06:56:57",
"discount_type": "percent",
"description": "10% de desconto em todo o pedido, uso único",
"date_expires": null,
"date_expires_gmt": null,
"usage_count": 1,
"individual_use": false,
"product_ids": [
],
"excluded_product_ids": [
],
"usage_limit": 1,
"usage_limit_per_user": 1,
"limit_usage_to_x_items": null,
"free_shipping": false,
"product_categories": [
],
"excluded_product_categories": [
],
"exclude_sale_items": false,
"minimum_amount": "0.00",
"maximum_amount": "0.00",
"email_restrictions": [
],
"used_by": [
"mark@doe.com"
],
"meta_data": [
],
"_links": {
"self": [...], // 1 item
"collection": [...] // 1 item
}
}
]

Obter informações do cupom

Esta ação é usada para buscar informações de um cupom específico usando seu ID de cupom.

O payload de resposta recebido é o seguinte:

{
"id": 4592,
"code": "vipdiscount60fc",
"amount": "10.00",
"status": "publish",
"date_created": "2023-01-25T06:56:57",
"date_created_gmt": "2023-01-25T06:56:57",
"date_modified": "2023-01-25T06:56:57",
"date_modified_gmt": "2023-01-25T06:56:57",
"discount_type": " percent",
"description": "10% de desconto em todo o pedido, uso único",
"date_expires": null,
"date_expires_gmt": null,
"usage_count": 1,
"individual_use": false,
"product_ids": [
],
"excluded_product_ids": [
],
"usage_limit": 1,
"usage_limit_per_user": 1,
"limit_usage_to_x_items": null,
"free_shipping": false,
"product_categories": [
],
"excluded_product_categories": [
],
"exclude_sale_items": false,
"minimum_amount": "0.00",
"maximum_amount": "0.00",
"email_restrictions": [
],
"used_by": [
"mark@doe.com"
],
"meta_data": [
]
}
{
"id": 4592,
"code": "vipdiscount60fc",
"amount": "10.00",
"status": "publish",
"date_created": "2023-01-25T06:56:57",
"date_created_gmt": "2023-01-25T06:56:57",
"date_modified": "2023-01-25T06:56:57",
"date_modified_gmt": "2023-01-25T06:56:57",
"discount_type": " percent",
"description": "10% de desconto em todo o pedido, uso único",
"date_expires": null,
"date_expires_gmt": null,
"usage_count": 1,
"individual_use": false,
"product_ids": [
],
"excluded_product_ids": [
],
"usage_limit": 1,
"usage_limit_per_user": 1,
"limit_usage_to_x_items": null,
"free_shipping": false,
"product_categories": [
],
"excluded_product_categories": [
],
"exclude_sale_items": false,
"minimum_amount": "0.00",
"maximum_amount": "0.00",
"email_restrictions": [
],
"used_by": [
"mark@doe.com"
],
"meta_data": [
]
}

Excluir cupom

Esta ação é usada para excluir um cupom com base em seu ID de cupom.

O payload de resposta recebido é o seguinte:

{
"status": "ok"
}
{
"status": "ok"
}

Criar cupom

Esta ação é usada para criar um cupom.

O payload de resposta recebido é o seguinte:

{
"id": 4598,
"code": "test12",
"amount": "10.00",
"status": "publish",
"date_created": "2023-04-14T14:27:49",
"date_created_gmt": "2023-04-14T14:27:49",
"date_modified": "2023-04-14T14:27:49",
"date_modified_gmt": "2023-04-14T14:27:49",
"discount_type": "percent",
"description": "cupom de teste",
"date_expires": "2023-05-01T00:00:00",
"date_expires_gmt": "2023-05-01T00:00:00",
"usage_count": 0,
"individual_use": false,
"product_ids": [
],
"excluded_product_ids": [
],
"usage_limit": 1,
"usage_limit_per_user": 1,
"limit_usage_to_x_items": null,
"free_shipping": false,
"product_categories": [
],
"excluded_product_categories": [
],
"exclude_sale_items": false,
"minimum_amount": "0.00",
"maximum_amount": "0.00",
"email_restrictions": [
],
"used_by": [
],
"meta_data": [
]
}
{
"id": 4598,
"code": "test12",
"amount": "10.00",
"status": "publish",
"date_created": "2023-04-14T14:27:49",
"date_created_gmt": "2023-04-14T14:27:49",
"date_modified": "2023-04-14T14:27:49",
"date_modified_gmt": "2023-04-14T14:27:49",
"discount_type": "percent",
"description": "cupom de teste",
"date_expires": "2023-05-01T00:00:00",
"date_expires_gmt": "2023-05-01T00:00:00",
"usage_count": 0,
"individual_use": false,
"product_ids": [
],
"excluded_product_ids": [
],
"usage_limit": 1,
"usage_limit_per_user": 1,
"limit_usage_to_x_items": null,
"free_shipping": false,
"product_categories": [
],
"excluded_product_categories": [
],
"exclude_sale_items": false,
"minimum_amount": "0.00",
"maximum_amount": "0.00",
"email_restrictions": [
],
"used_by": [
],
"meta_data": [
]
}

Atualizar cupom

Esta ação é usada para atualizar um cupom usando seu ID de cupom.

O payload de resposta recebido é o seguinte:

{
"id": 4598,
"code": "test12",
"amount": "15.00",
"status": "publish",
"date_created": "2023-04-14T14:27:49",
"date_created_gmt": "2023-04-14T14:27:49",
"date_modified": "2023-04-14T14:27:49",
"date_modified_gmt": "2023-04-14T14:27:49",
"discount_type": "percent",
"description": "cupom de teste",
"date_expires": "2023-05-01T00:00:00",
"date_expires_gmt": "2023-05-01T00:00:00",
"usage_count": 0,
"individual_use": false,
"product_ids": [
],
"excluded_product_ids": [
],
"usage_limit": 3,
"usage_limit_per_user": 1,
"limit_usage_to_x_items": null,
"free_shipping": false,
"product_categories": [
],
"excluded_product_categories": [
],
"exclude_sale_items": false,
"minimum_amount": "0.00",
"maximum_amount": "0.00",
"email_restrictions": [
],
"used_by": [
],
"meta_data": [
]
}
{
"id": 4598,
"code": "test12",
"amount": "15.00",
"status": "publish",
"date_created": "2023-04-14T14:27:49",
"date_created_gmt": "2023-04-14T14:27:49",
"date_modified": "2023-04-14T14:27:49",
"date_modified_gmt": "2023-04-14T14:27:49",
"discount_type": "percent",
"description": "cupom de teste",
"date_expires": "2023-05-01T00:00:00",
"date_expires_gmt": "2023-05-01T00:00:00",
"usage_count": 0,
"individual_use": false,
"product_ids": [
],
"excluded_product_ids": [
],
"usage_limit": 3,
"usage_limit_per_user": 1,
"limit_usage_to_x_items": null,
"free_shipping": false,
"product_categories": [
],
"excluded_product_categories": [
],
"exclude_sale_items": false,
"minimum_amount": "0.00",
"maximum_amount": "0.00",
"email_restrictions": [
],
"used_by": [
],
"meta_data": [
]
}

Pesquisar clientes

Esta ação é utilizada para buscar clientes por meio de diversos parâmetros e consultas.

O payload de resposta recebido é o seguinte:

[
{
"id": 2,
"date_created": "2022-10-10T01:24:22",
"date_created_gmt": "2022-10-10T01:24:22",
"date_modified": "2022-10-10T01:24:22",
"date_modified_gmt": "2022-10-10T01:24:22",
"email": "test@test.com",
"first_name": "",
"last_name": "last",
"role": "customer",
"username": "teste",
"billing": {
"first_name": "",
"last_name": "",
"company": "",
"address_1": "",
"address_2": "",
"city": "",
"postcode": "",
"country": "",
"state": "",
"email": "",
"phone": ""
},
"shipping": {
"first_name": "",
"last_name": "",
"company": "",
"address_1": "",
"address_2": "",
"city": "",
"postcode": " ",
"country": "",
"state": "",
"phone": ""
},
"is_paying_customer": false,
"avatar_url": "https://secure.gravatar.com/avatar/b642b4217b34b1e8d3bd915fc65c4452?s =96&d=mm&r=g",
"meta_data": [
{...} // 3 chaves
],
"_links": {
"self": [...], // 1 item
"collection": [.. .] // 1 itens
}
},
{
"id": 5 ,
"date_created": "2022-10-12T16:32:26",
"date_created_gmt": "2022-10-12T16:32:26",
"date_modified": "2022-10-12T16:32:26",
"date_modified_gmt": "2022-10-12T16:32:26",
"email": "mark@NicoChat.com.br",
"first_name": "Mark",
"last_name": "van der Made",
"role": "customer",
"username": "markvdmade",
"billing": {
"first_name": "Mark",
"last_name": "van der Made",
"company": "",
"address_1": "palmonostora 143",
"address_2": "",
"city": "Palmonostora",
"postcode": "6112",
"country": "Hungria",
"state": "bacs-kiskun",
"email": "mark@NicoChat.com.br",
"phone": " +36707203759"
},
"shipping": {
"first_name": "Mark",
"last_name": "van der Made",
"company": "",
"address_1": "palmonostora 143",
"address_2": "",
"city": "Palmonostora",
"postcode": "6112",
"country": "Hungria",
"state": "bacs-kiskun",
"phone": ""
},
"is_paying_customer": false,
"avatar_url": "https://secure.gravatar.com/avatar/f96de5c9ef467d55b706b615b56a641b?s=96&d=mm&r=g",
"meta_data": [
],
"_links": {
"self": [...], / / 1 itens
"collection": [...] // 1 itens
}
}
]
[
{
"id": 2,
"date_created": "2022-10-10T01:24:22",
"date_created_gmt": "2022-10-10T01:24:22",
"date_modified": "2022-10-10T01:24:22",
"date_modified_gmt": "2022-10-10T01:24:22",
"email": "test@test.com",
"first_name": "",
"last_name": "last",
"role": "customer",
"username": "teste",
"billing": {
"first_name": "",
"last_name": "",
"company": "",
"address_1": "",
"address_2": "",
"city": "",
"postcode": "",
"country": "",
"state": "",
"email": "",
"phone": ""
},
"shipping": {
"first_name": "",
"last_name": "",
"company": "",
"address_1": "",
"address_2": "",
"city": "",
"postcode": " ",
"country": "",
"state": "",
"phone": ""
},
"is_paying_customer": false,
"avatar_url": "https://secure.gravatar.com/avatar/b642b4217b34b1e8d3bd915fc65c4452?s =96&d=mm&r=g",
"meta_data": [
{...} // 3 chaves
],
"_links": {
"self": [...], // 1 item
"collection": [.. .] // 1 itens
}
},
{
"id": 5 ,
"date_created": "2022-10-12T16:32:26",
"date_created_gmt": "2022-10-12T16:32:26",
"date_modified": "2022-10-12T16:32:26",
"date_modified_gmt": "2022-10-12T16:32:26",
"email": "mark@NicoChat.com.br",
"first_name": "Mark",
"last_name": "van der Made",
"role": "customer",
"username": "markvdmade",
"billing": {
"first_name": "Mark",
"last_name": "van der Made",
"company": "",
"address_1": "palmonostora 143",
"address_2": "",
"city": "Palmonostora",
"postcode": "6112",
"country": "Hungria",
"state": "bacs-kiskun",
"email": "mark@NicoChat.com.br",
"phone": " +36707203759"
},
"shipping": {
"first_name": "Mark",
"last_name": "van der Made",
"company": "",
"address_1": "palmonostora 143",
"address_2": "",
"city": "Palmonostora",
"postcode": "6112",
"country": "Hungria",
"state": "bacs-kiskun",
"phone": ""
},
"is_paying_customer": false,
"avatar_url": "https://secure.gravatar.com/avatar/f96de5c9ef467d55b706b615b56a641b?s=96&d=mm&r=g",
"meta_data": [
],
"_links": {
"self": [...], / / 1 itens
"collection": [...] // 1 itens
}
}
]

Obter informações do cliente

Esta ação é usada para buscar informações de um cliente usando seu ID de cliente.

{
"id": 2,
"date_created": "2022-10-10T01:24:22",
"date_created_gmt": "2022-10-10T01:24:22",
"date_modified": "2022-10-10T01:24:22",
"date_modified_gmt": "2022-10-10T01:24:22",
"email": "test@test.com",
"first_name": "",
"last_name": "last",
"role": "customer",
"username": "teste",
"billing": {
"first_name": "",
"last_name": "",
"company": "",
"address_1": "",
"address_2": "",
"city": "",
"postcode": "",
"country": "",
"state": "",
"email": "",
"phone": ""
},
"shipping": {
"first_name": "",
"last_name": "",
"company": "",
"address_1": "",
"address_2": "",
"city": "",
"postcode": "",
"country": "",
"state": "",
"phone": ""
},
"is_paying_customer": false,
"avatar_url": "https://secure.gravatar.com/avatar/b642b4217b34b1e8d3bd915fc65c4452?s= 96&d=mm&r=g",
"meta_data": [
{
"id": 62,
"key": "wc_last_active",
"value": "1665532800"
}
]
}
{
"id": 2,
"date_created": "2022-10-10T01:24:22",
"date_created_gmt": "2022-10-10T01:24:22",
"date_modified": "2022-10-10T01:24:22",
"date_modified_gmt": "2022-10-10T01:24:22",
"email": "test@test.com",
"first_name": "",
"last_name": "last",
"role": "customer",
"username": "teste",
"billing": {
"first_name": "",
"last_name": "",
"company": "",
"address_1": "",
"address_2": "",
"city": "",
"postcode": "",
"country": "",
"state": "",
"email": "",
"phone": ""
},
"shipping": {
"first_name": "",
"last_name": "",
"company": "",
"address_1": "",
"address_2": "",
"city": "",
"postcode": "",
"country": "",
"state": "",
"phone": ""
},
"is_paying_customer": false,
"avatar_url": "https://secure.gravatar.com/avatar/b642b4217b34b1e8d3bd915fc65c4452?s= 96&d=mm&r=g",
"meta_data": [
{
"id": 62,
"key": "wc_last_active",
"value": "1665532800"
}
]
}

Criar cliente

Esta ação é usada para criar um cliente.

O payload de resposta recebido é o seguinte:

{
"id": 6,
"date_created": "2023-04-14T17:54:14",
"date_created_gmt": "2023-04-14T17:54:14",
"date_modified": "2023-04-14T17:54:14",
"date_modified_gmt": "2023-04-14T17:54:14",
"email": siddiqui788@gmail.com",
"first_name": "Hammad",
"last_name": "Siddiqui",
"role": "customer",
"username": "HammadSiddiqui76",
"billing": {
"first_name": "Hammad",
"last_name": "Siddiqui",
"company": "",
"address_1": "abc road, cidade jardim",
"address_2": "Maymar, Karachi",
"city": "Karachi",
"postcode": "78601",
"country": "Paquistão",
"state": "Sindh",
"email": "hadsiddiqui788@gmail.com",
"phone": "+923032320964"
},
"shipping": {
"first_name": "Hammad",
"last_name": "Siddiqui",
"company": "",
"address_1": "abc road, cidade jardim",
"address_2": "Maymar, Karachi",
"city": "Karachi",
"postcode": "78601",
"country": "Paquistão",
"state": "Sindh",
"phone": ""
},
"is_paying_customer": false,
"avatar_url": "https://secure.gravatar.com/avatar/f4c6265a08a9578979e81cc594810336?s=96&d=mm&r=g",
"meta_data": [
]
}
{
"id": 6,
"date_created": "2023-04-14T17:54:14",
"date_created_gmt": "2023-04-14T17:54:14",
"date_modified": "2023-04-14T17:54:14",
"date_modified_gmt": "2023-04-14T17:54:14",
"email": siddiqui788@gmail.com",
"first_name": "Hammad",
"last_name": "Siddiqui",
"role": "customer",
"username": "HammadSiddiqui76",
"billing": {
"first_name": "Hammad",
"last_name": "Siddiqui",
"company": "",
"address_1": "abc road, cidade jardim",
"address_2": "Maymar, Karachi",
"city": "Karachi",
"postcode": "78601",
"country": "Paquistão",
"state": "Sindh",
"email": "hadsiddiqui788@gmail.com",
"phone": "+923032320964"
},
"shipping": {
"first_name": "Hammad",
"last_name": "Siddiqui",
"company": "",
"address_1": "abc road, cidade jardim",
"address_2": "Maymar, Karachi",
"city": "Karachi",
"postcode": "78601",
"country": "Paquistão",
"state": "Sindh",
"phone": ""
},
"is_paying_customer": false,
"avatar_url": "https://secure.gravatar.com/avatar/f4c6265a08a9578979e81cc594810336?s=96&d=mm&r=g",
"meta_data": [
]
}

Atualizar cliente

Esta ação é usada para atualizar os detalhes de um cliente usando seu ID de cliente.

Depois de criados, o nome de usuário e a senha do cliente não podem ser alterados pelo administrador.

O payload de resposta recebido é o seguinte:

{
"id": 6,
"date_created": "2023-04-14T17:54:14",
"date_created_gmt": "2023-04-14T17:54:14",
"date_modified": "2023-04-14T17:57:24",
"date_modified_gmt": "2023-04-14T17:57:24",
"email": "hammadsiddiqui788@gmail.com",
"first_name": "Hammad",
"last_name": "Siddiqui",
"role": "customer",
"username": "HammadSiddiqui76",
"billing": {
"first_name": "Hammad",
"last_name": "Siddiqui",
"company": "",
"address_1": "abc road, cidade jardim",
"address_2": "Maymar, Karachi",
"city": "Karachi",
"postcode": "78601",
"country": "Paquistão",
"state": "Sindh",
"email": "hasiddiqui788@gmail.com",
"phone": "+923032320964"
},
"shipping": {
"first_name": "Hammad",
"last_name": "Siddiqui",
"company": "",
"address_1": "abc road, cidade jardim",
"address_2": "Maymar, Karachi",
"city": "Karachi",
"postcode": "78601",
"country": "Paquistão",
"state": "Sindh",
"phone": ""
},
"is_paying_customer": false,
"avatar_url": "https://secure.gravatar.com/avatar/f4c6265a08a9578979e81cc594810336?s=96&d=mm&r=g",
"meta_data": [
]
}
{
"id": 6,
"date_created": "2023-04-14T17:54:14",
"date_created_gmt": "2023-04-14T17:54:14",
"date_modified": "2023-04-14T17:57:24",
"date_modified_gmt": "2023-04-14T17:57:24",
"email": "hammadsiddiqui788@gmail.com",
"first_name": "Hammad",
"last_name": "Siddiqui",
"role": "customer",
"username": "HammadSiddiqui76",
"billing": {
"first_name": "Hammad",
"last_name": "Siddiqui",
"company": "",
"address_1": "abc road, cidade jardim",
"address_2": "Maymar, Karachi",
"city": "Karachi",
"postcode": "78601",
"country": "Paquistão",
"state": "Sindh",
"email": "hasiddiqui788@gmail.com",
"phone": "+923032320964"
},
"shipping": {
"first_name": "Hammad",
"last_name": "Siddiqui",
"company": "",
"address_1": "abc road, cidade jardim",
"address_2": "Maymar, Karachi",
"city": "Karachi",
"postcode": "78601",
"country": "Paquistão",
"state": "Sindh",
"phone": ""
},
"is_paying_customer": false,
"avatar_url": "https://secure.gravatar.com/avatar/f4c6265a08a9578979e81cc594810336?s=96&d=mm&r=g",
"meta_data": [
]
}

Excluir cliente

Esta ação é usada para excluir um cliente específico usando seu ID de cliente.

O payload de resposta recebido é o seguinte:

{
"id": 2,
"date_created": "2022-10-10T01:24:22" ,
"date_created_gmt": "2022-10-10T01:24:22",
"date_modified": "2022-10-10T01:24:22",
"date_modified_gmt": "2022-10-10T01:24:22",
"email": "test@test.com",
"first_name": "",
"last_name": "last",
"role": "customer",
"username": "teste",
"billing": {
"first_name": "",
"last_name": "",
"company": "",
"address_1": "",
"address_2": "",
"city": "",
"postcode": "",
"country": "",
"state": "",
"email": "",
"phone": ""
},
"shipping": {
"first_name": "",
"last_name": "",
"company": "",
"address_1": "",
"address_2": "",
"city": "",
"postcode": "",
"country": "",
"state": "",
"phone": ""
},
"is_paying_customer": false,
"avatar_url": "https://secure.gravatar.com/avatar/b642b4217b34b1e8d3bd915fc65c4452?s= 96&d=mm&r=g",
"meta_data": [
{
"id": 62,
"key": "wc_last_active",
"value": "1665532800"
}
]
}
{
"id": 2,
"date_created": "2022-10-10T01:24:22" ,
"date_created_gmt": "2022-10-10T01:24:22",
"date_modified": "2022-10-10T01:24:22",
"date_modified_gmt": "2022-10-10T01:24:22",
"email": "test@test.com",
"first_name": "",
"last_name": "last",
"role": "customer",
"username": "teste",
"billing": {
"first_name": "",
"last_name": "",
"company": "",
"address_1": "",
"address_2": "",
"city": "",
"postcode": "",
"country": "",
"state": "",
"email": "",
"phone": ""
},
"shipping": {
"first_name": "",
"last_name": "",
"company": "",
"address_1": "",
"address_2": "",
"city": "",
"postcode": "",
"country": "",
"state": "",
"phone": ""
},
"is_paying_customer": false,
"avatar_url": "https://secure.gravatar.com/avatar/b642b4217b34b1e8d3bd915fc65c4452?s= 96&d=mm&r=g",
"meta_data": [
{
"id": 62,
"key": "wc_last_active",
"value": "1665532800"
}
]
}

Pesquisar pedidos

Esta ação é usada para pesquisar pedidos usando vários parâmetros e consultas.

O payload de resposta recebido é o seguinte:

[
{
"id": 4597,
"parent_id": 0,
"status": "pending",
"currency": "AUD",
"version": "6.9.4",
"prices_include_tax": false,
"date_created": "2023-04-14T11:01:51",
"date_modified": "2023-04-14T11:01:51",
"discount_total": "0.00",
"discount_tax": "0.00",
"shipping_total": "0.00" ,
"shipping_tax": "0.00",
"cart_tax": "0.00",
"total": "350.00",
"total_tax": "0.00",
"customer_id": 0,
"order_key": "wc_order_5hKQmDkxUiesi",
"billing": {
"first_name": "Hammad",
"last_name": "Siddiqui",
"company": "",
"address_1": "ABC Road, Garden City",
"address_2": "",
"city": " Karachi",
"state": "Sindh",
"postcode": "",
"country": "Paquistão",
"email": "hamddiqui788@gmail.com",
"phone": "+9230302320964"
},
"shipping": {
"first_name": "Hammad",
"last_name": "Siddiqui",
"company": "",
"address_1": "ABC Road, Garden City",
"address_2": "",
"city": " Karachi",
"state": "Sindh",
"postcode": "",
"country": "Paquistão",
"phone":""
},
"payment_method": "",
"payment_method_title": "",
"transaction_id": "",
"customer_ip_address": "",
"customer_user_agent": "",
"created_via": "rest-api",
"customer_note": "",
"date_completed": null,
"date_paid": null,
"cart_hash":"",
"number": "4597",
"meta_data": [
{...} // 3 chaves
],
"line_items": [
{...} // 16 chaves
],
"tax_lines": [
],
"shipping_lines": [
],
"fee_lines": [
],
"coupon_lines": [
],
"refunds": [
],
"payment_url": "https://shop.businessautomated.io/checkout-2/order-pay /4597?pay_for_order=true&key=wc_order_5hKQmDkxUiesi",
"is_editable": true,
"needs_payment": true,
"needs_processing": true,
"date_created_gmt": "2023-04-14T11:01:51",
"date_modified_gmt": "2023-04-14T11:01:51",
"date_completed_gmt": null,
"date_paid_gmt": null,
"currency_symbol": "$",
"_links": {
"self": [...], // 1 itens
"collection": [...] // 1 itens
}
}
]
[
{
"id": 4597,
"parent_id": 0,
"status": "pending",
"currency": "AUD",
"version": "6.9.4",
"prices_include_tax": false,
"date_created": "2023-04-14T11:01:51",
"date_modified": "2023-04-14T11:01:51",
"discount_total": "0.00",
"discount_tax": "0.00",
"shipping_total": "0.00" ,
"shipping_tax": "0.00",
"cart_tax": "0.00",
"total": "350.00",
"total_tax": "0.00",
"customer_id": 0,
"order_key": "wc_order_5hKQmDkxUiesi",
"billing": {
"first_name": "Hammad",
"last_name": "Siddiqui",
"company": "",
"address_1": "ABC Road, Garden City",
"address_2": "",
"city": " Karachi",
"state": "Sindh",
"postcode": "",
"country": "Paquistão",
"email": "hamddiqui788@gmail.com",
"phone": "+9230302320964"
},
"shipping": {
"first_name": "Hammad",
"last_name": "Siddiqui",
"company": "",
"address_1": "ABC Road, Garden City",
"address_2": "",
"city": " Karachi",
"state": "Sindh",
"postcode": "",
"country": "Paquistão",
"phone":""
},
"payment_method": "",
"payment_method_title": "",
"transaction_id": "",
"customer_ip_address": "",
"customer_user_agent": "",
"created_via": "rest-api",
"customer_note": "",
"date_completed": null,
"date_paid": null,
"cart_hash":"",
"number": "4597",
"meta_data": [
{...} // 3 chaves
],
"line_items": [
{...} // 16 chaves
],
"tax_lines": [
],
"shipping_lines": [
],
"fee_lines": [
],
"coupon_lines": [
],
"refunds": [
],
"payment_url": "https://shop.businessautomated.io/checkout-2/order-pay /4597?pay_for_order=true&key=wc_order_5hKQmDkxUiesi",
"is_editable": true,
"needs_payment": true,
"needs_processing": true,
"date_created_gmt": "2023-04-14T11:01:51",
"date_modified_gmt": "2023-04-14T11:01:51",
"date_completed_gmt": null,
"date_paid_gmt": null,
"currency_symbol": "$",
"_links": {
"self": [...], // 1 itens
"collection": [...] // 1 itens
}
}
]

Obter informações do pedido

Esta ação é usada para buscar informações do pedido usando o ID do pedido.

O payload de resposta recebido é o seguinte:

{
"id": 4597,
"parent_id": 0,
"status": "pending",
"currency": "AUD",
"version": "6.9.4",
"prices_include_tax": false,
"date_created": "2023-04-14T11:01:51",
"date_modified": "2023-04-14T11:01:51",
"discount_total": "0.00",
"discount_tax": "0.00",
"shipping_total": "0.00",
"shipping_tax": "0.00",
"cart_tax": "0.00",
"total": "350.00",
"total_tax": "0.00",
"customer_id": 0,
"order_key": "wc_order_5hKQmDkxUiesi",
"billing": {
"first_name": "Hammad",
"last_name": "Siddiqui",
"company": "",
"address_1": "ABC Road, Garden City",
"address_2": "",
"city": "Karachi ",
"state": "Sindh",
"postcode": "",
"country": "Paquistão",
"email": "hammiddiqui788@gmail.com",
"phone": "+9230302320964"
},
"shipping": {
"first_name": "Hammad",
"last_name": "Siddiqui",
"company": "",
"address_1": "ABC Road, Garden City",
"address_2": "",
"city": "Karachi ",
"state": "Sindh",
"postcode": "",
"country": "Paquistão",
"phone":""
},
"payment_method": "",
"payment_method_title": "",
"transaction_id": "",
"customer_ip_address": "",
"customer_user_agent": "",
"created_via": "rest-api",
"customer_note": "",
"date_completed": null,
"date_paid": null,
"cart_hash": ""
"number": "4597",
"meta_data": [
{
"id": 6465,
"key": "user_ns",
"value": "f12372u15376836"
}
],
"line_items": [
{
"id": 259,
"name": "Sapatos pretos DNK - azul",
"product_id": 375,
"variation_id": 4120,
"quantity": 2,
"tax_class": "",
"subtotal": "350.00",
"subtotal_tax": "0.00",
"total": "350.00",
"total_tax": "0.00",
"taxes": [...], // 0 itens
"meta_data": [...], // 1 item
"sku": "",
"price": 175,
"image": {...}, // 2 chaves
"parent_name": "DNK Black Shoes"
}
],
"tax_lines": [
],
"shipping_lines": [
],
"fee_lines": [
],
"coupon_lines": [
],
"refunds": [
],
"payment_url": "https://shop.businessautomated.io/checkout-2/order-pay/4597?pay_for_order=true&key =wc_order_5hKQmDkxUiesi",
"is_editable": true,
"needs_payment": true,
"needs_processing": true,
"date_created_gmt": "2023-04-14T11:01:51",
"date_modified_gmt": "2023-04-14T11:01:51",
"date_completed_gmt": null,
"date_paid_gmt": null,
"currency_symbol": "$"
}
{
"id": 4597,
"parent_id": 0,
"status": "pending",
"currency": "AUD",
"version": "6.9.4",
"prices_include_tax": false,
"date_created": "2023-04-14T11:01:51",
"date_modified": "2023-04-14T11:01:51",
"discount_total": "0.00",
"discount_tax": "0.00",
"shipping_total": "0.00",
"shipping_tax": "0.00",
"cart_tax": "0.00",
"total": "350.00",
"total_tax": "0.00",
"customer_id": 0,
"order_key": "wc_order_5hKQmDkxUiesi",
"billing": {
"first_name": "Hammad",
"last_name": "Siddiqui",
"company": "",
"address_1": "ABC Road, Garden City",
"address_2": "",
"city": "Karachi ",
"state": "Sindh",
"postcode": "",
"country": "Paquistão",
"email": "hammiddiqui788@gmail.com",
"phone": "+9230302320964"
},
"shipping": {
"first_name": "Hammad",
"last_name": "Siddiqui",
"company": "",
"address_1": "ABC Road, Garden City",
"address_2": "",
"city": "Karachi ",
"state": "Sindh",
"postcode": "",
"country": "Paquistão",
"phone":""
},
"payment_method": "",
"payment_method_title": "",
"transaction_id": "",
"customer_ip_address": "",
"customer_user_agent": "",
"created_via": "rest-api",
"customer_note": "",
"date_completed": null,
"date_paid": null,
"cart_hash": ""
"number": "4597",
"meta_data": [
{
"id": 6465,
"key": "user_ns",
"value": "f12372u15376836"
}
],
"line_items": [
{
"id": 259,
"name": "Sapatos pretos DNK - azul",
"product_id": 375,
"variation_id": 4120,
"quantity": 2,
"tax_class": "",
"subtotal": "350.00",
"subtotal_tax": "0.00",
"total": "350.00",
"total_tax": "0.00",
"taxes": [...], // 0 itens
"meta_data": [...], // 1 item
"sku": "",
"price": 175,
"image": {...}, // 2 chaves
"parent_name": "DNK Black Shoes"
}
],
"tax_lines": [
],
"shipping_lines": [
],
"fee_lines": [
],
"coupon_lines": [
],
"refunds": [
],
"payment_url": "https://shop.businessautomated.io/checkout-2/order-pay/4597?pay_for_order=true&key =wc_order_5hKQmDkxUiesi",
"is_editable": true,
"needs_payment": true,
"needs_processing": true,
"date_created_gmt": "2023-04-14T11:01:51",
"date_modified_gmt": "2023-04-14T11:01:51",
"date_completed_gmt": null,
"date_paid_gmt": null,
"currency_symbol": "$"
}

Criar pedido a partir de um único produto

Esta ação é usada para criar um pedido com apenas um item ou produto. (Para vários itens, use a ação Criar pedido do carrinho.)

O payload de resposta recebido é o seguinte:

{
"id": 4599,
"parent_id": 0,
"status": "pending",
"currency": "AUD",
"version": "6.9.4",
"prices_include_tax": false,
"date_created": "2023-04-14T18:13:13",
"date_modified": "2023-04-14T18:13:13",
"discount_total": "0.00",
"discount_tax": "0.00",
"shipping_total": "0.00" ,
"shipping_tax": "0.00",
"cart_tax": "0.00",
"total": "175.00",
"total_tax": "0.00",
"customer_id": 4,
"order_key": "wc_order_yhGfOfZ0eoCYe",
"billing": {
"first_name": "",
"last_name": "",
"company": "",
"address_1": "",
"address_2": "",
"city": "",
"state": "",
"postcode": "",
"country": "",
"email": "mark@NicoChat.com.br",
"phone": ""
},
"shipping": {
"first_name": "",
"last_name": "",
"company": "",
"address_1": "",
"address_2": "",
"city": "",
"state": "",
"postcode": "",
"country": "",
"phone": ""
},
"payment_method": "" ,
"payment_method_title": "",
"transaction_id": "",
"customer_ip_address": "",
"customer_user_agent": "",
"created_via": "rest-api",
"customer_note": "",
"date_completed": null,
"date_paid": null,
"cart_hash": "",
"number": "4599",
"meta_data": [
],
"line_items": [
{
"id": 260,
"name": "Sapatos Pretos DNK - azul",
"product_id": 375,
"variation_id": 4120,
"quantity": 1,
"tax_class": "",
"subtotal": "175.00",
"subtotal_tax": "0.00",
"total": "175.00",
"total_tax": "0.00",
"taxes": [...], // 0 itens
"meta_data": [...], // 1 item
"sku": "",
"price": 175,
"image": {...}, // 2 chaves
"parent_name": "DNK Black Shoes"
}
],
"tax_lines": [
],
"shipping_lines": [
],
"fee_lines": [
],
"coupon_lines": [
],
"refunds": [
],
"payment_url": "https://shop.businessautomated.io/checkout-2/order-pay /4599?pay_for_order=true&key=wc_order_yhGfOfZ0eoCYe",
"is_editable": true,
"needs_payment": true,
"needs_processing": true,
"date_created_gmt": "2023-04-14T18:13:13",
"date_modified_gmt": "2023-04-14T18:13:13",
"date_completed_gmt": null,
"date_paid_gmt": null,
"currency_symbol": "$"
}
{
"id": 4599,
"parent_id": 0,
"status": "pending",
"currency": "AUD",
"version": "6.9.4",
"prices_include_tax": false,
"date_created": "2023-04-14T18:13:13",
"date_modified": "2023-04-14T18:13:13",
"discount_total": "0.00",
"discount_tax": "0.00",
"shipping_total": "0.00" ,
"shipping_tax": "0.00",
"cart_tax": "0.00",
"total": "175.00",
"total_tax": "0.00",
"customer_id": 4,
"order_key": "wc_order_yhGfOfZ0eoCYe",
"billing": {
"first_name": "",
"last_name": "",
"company": "",
"address_1": "",
"address_2": "",
"city": "",
"state": "",
"postcode": "",
"country": "",
"email": "mark@NicoChat.com.br",
"phone": ""
},
"shipping": {
"first_name": "",
"last_name": "",
"company": "",
"address_1": "",
"address_2": "",
"city": "",
"state": "",
"postcode": "",
"country": "",
"phone": ""
},
"payment_method": "" ,
"payment_method_title": "",
"transaction_id": "",
"customer_ip_address": "",
"customer_user_agent": "",
"created_via": "rest-api",
"customer_note": "",
"date_completed": null,
"date_paid": null,
"cart_hash": "",
"number": "4599",
"meta_data": [
],
"line_items": [
{
"id": 260,
"name": "Sapatos Pretos DNK - azul",
"product_id": 375,
"variation_id": 4120,
"quantity": 1,
"tax_class": "",
"subtotal": "175.00",
"subtotal_tax": "0.00",
"total": "175.00",
"total_tax": "0.00",
"taxes": [...], // 0 itens
"meta_data": [...], // 1 item
"sku": "",
"price": 175,
"image": {...}, // 2 chaves
"parent_name": "DNK Black Shoes"
}
],
"tax_lines": [
],
"shipping_lines": [
],
"fee_lines": [
],
"coupon_lines": [
],
"refunds": [
],
"payment_url": "https://shop.businessautomated.io/checkout-2/order-pay /4599?pay_for_order=true&key=wc_order_yhGfOfZ0eoCYe",
"is_editable": true,
"needs_payment": true,
"needs_processing": true,
"date_created_gmt": "2023-04-14T18:13:13",
"date_modified_gmt": "2023-04-14T18:13:13",
"date_completed_gmt": null,
"date_paid_gmt": null,
"currency_symbol": "$"
}

Atualizar pedido

Esta ação é usada para atualizar as informações e o status do pedido usando o ID do pedido.

O payload de resposta recebido é o seguinte:

{
"id": 4597,
"parent_id": 0,
"status": "completed",
"currency": "AUD",
"version": "6.9.4",
"prices_include_tax": false,
"date_created": "2023-04-14T11:01:51",
"date_modified": "2023-04-14T18:16:14",
"discount_total": "0.00", "cart_hash": "", "number":
"discount_tax": "0.00",
"shipping_total": "0.00",
"shipping_tax": "0.00",
"cart_tax": "0.00",
"total": "350.00", "4597", "meta_data": [ { "id": 6465, "key": "user_ns", "value": "f12372u15376836" }, { "id":
"total_tax": "0.00",
"customer_id": 0,
"order_key": "wc_order_5hKQmDkxUiesi",
"billing": {
"first_name": "Hammad",
"last_name": "Siddiqui",
"company": "",
"address_1": "ABC Road, Garden City",
"address_2": "",
"city": "Karachi ",
"state": "Sindh",
"postcode": "",
"country": "Paquistão",
"email": "ddiqui788@gmail.com",
"phone": "+9230302320964"
},
"shipping": {
"first_name": "Hammad",
"last_name": "Siddiqui",
"company": "",
"address_1": "ABC Road, Garden City",
"address_2": "",
"city": "Karachi ",
"state": "Sindh",
"postcode": "",
"country": "Paquistão",
"phone":""
},
"payment_method": "",
"payment_method_title": "",
"transaction_id": "",
"customer_ip_address": "",
"customer_user_agent": "",
"created_via": "rest-api",
"customer_note": "",
"date_completed": "2023-04-14T18:16:14",
"date_paid": "2023-04-14T18:16:14" ,








6499,
"key": "_new_order_email_sent",
"value": "true"
}
],
"line_items": [
{
"id": 259,
"name": "DNK Black Shoes - blue",
"product_id": 375,
"variation_id": 4120,
"quantity": 2,
"tax_class": "",
"subtotal": "350.00",
"subtotal_tax": "0.00",
"total": "350.00",
"total_tax": "0.00" ,
"taxes": [...], // 0 itens
"meta_data": [...], // 1 item
"sku": "",
"price": 175,
"image": {...}, // 2 chaves
"parent_name": "DNK Black Shoes"
}
],
"tax_lines": [
],
"shipping_lines": [
],
"fee_lines": [
],
"coupon_lines": [
],
"refunds": [
],
"payment_url": "https://shop.businessautomated.io/checkout-2/order-pay/4597?pay_for_order=true&key=wc_order_5hKQmDkxUiesi",
"is_editable": false,
"needs_payment": false,
"needs_processing": true,
"date_created_gmt": "2023-04-14T11:01:51",
"date_modified_gmt": "2023-04-14T18:16:14",
"date_completed_gmt": "2023-04-14T18:16:14",
"date_paid_gmt": "2023-04-14T18:16:14",
"currency_symbol": "$"
}
{
"id": 4597,
"parent_id": 0,
"status": "completed",
"currency": "AUD",
"version": "6.9.4",
"prices_include_tax": false,
"date_created": "2023-04-14T11:01:51",
"date_modified": "2023-04-14T18:16:14",
"discount_total": "0.00", "cart_hash": "", "number":
"discount_tax": "0.00",
"shipping_total": "0.00",
"shipping_tax": "0.00",
"cart_tax": "0.00",
"total": "350.00", "4597", "meta_data": [ { "id": 6465, "key": "user_ns", "value": "f12372u15376836" }, { "id":
"total_tax": "0.00",
"customer_id": 0,
"order_key": "wc_order_5hKQmDkxUiesi",
"billing": {
"first_name": "Hammad",
"last_name": "Siddiqui",
"company": "",
"address_1": "ABC Road, Garden City",
"address_2": "",
"city": "Karachi ",
"state": "Sindh",
"postcode": "",
"country": "Paquistão",
"email": "ddiqui788@gmail.com",
"phone": "+9230302320964"
},
"shipping": {
"first_name": "Hammad",
"last_name": "Siddiqui",
"company": "",
"address_1": "ABC Road, Garden City",
"address_2": "",
"city": "Karachi ",
"state": "Sindh",
"postcode": "",
"country": "Paquistão",
"phone":""
},
"payment_method": "",
"payment_method_title": "",
"transaction_id": "",
"customer_ip_address": "",
"customer_user_agent": "",
"created_via": "rest-api",
"customer_note": "",
"date_completed": "2023-04-14T18:16:14",
"date_paid": "2023-04-14T18:16:14" ,








6499,
"key": "_new_order_email_sent",
"value": "true"
}
],
"line_items": [
{
"id": 259,
"name": "DNK Black Shoes - blue",
"product_id": 375,
"variation_id": 4120,
"quantity": 2,
"tax_class": "",
"subtotal": "350.00",
"subtotal_tax": "0.00",
"total": "350.00",
"total_tax": "0.00" ,
"taxes": [...], // 0 itens
"meta_data": [...], // 1 item
"sku": "",
"price": 175,
"image": {...}, // 2 chaves
"parent_name": "DNK Black Shoes"
}
],
"tax_lines": [
],
"shipping_lines": [
],
"fee_lines": [
],
"coupon_lines": [
],
"refunds": [
],
"payment_url": "https://shop.businessautomated.io/checkout-2/order-pay/4597?pay_for_order=true&key=wc_order_5hKQmDkxUiesi",
"is_editable": false,
"needs_payment": false,
"needs_processing": true,
"date_created_gmt": "2023-04-14T11:01:51",
"date_modified_gmt": "2023-04-14T18:16:14",
"date_completed_gmt": "2023-04-14T18:16:14",
"date_paid_gmt": "2023-04-14T18:16:14",
"currency_symbol": "$"
}

Excluir pedido

Esta ação é usada para excluir um pedido usando o ID do pedido.

O payload de resposta recebido é o seguinte:

{
"id": 4597,
"parent_id": 0,
"status": "completed",
"currency": "AUD",
"version": "6.9.4",
"prices_include_tax": false,
"date_created": "2023-04-14T11:01:51",
"date_modified": "2023-04-14T18:16:14",
"discount_total": "0.00",
"discount_tax": "0.00",
"shipping_total": "0.00",
"shipping_tax": "0.00",
"cart_tax": "0.00",
"total": "350.00",
"total_tax": "0.00",
"customer_id": 0,
"order_key": "wc_order_5hKQmDkxUiesi",
"billing": {
"first_name": "Hammad",
"last_name": "Siddiqui",
"company": "",
"address_1": "ABC Road, Garden City",
"address_2": "",
"city": "Karachi ",
"state": "Sindh",
"postcode": "",
"country": "Paquistão",
"email": "dsiddiqui788@gmail.com",
"phone": "+9230302320964"
},
"shipping": {
"first_name": "Hammad",
"last_name": "Siddiqui",
"company": "",
"address_1": "ABC Road, Garden City",
"address_2": "",
"city": "Karachi ",
"state": "Sindh",
"postcode": "",
"country": "Paquistão",
"phone":""
},
"payment_method": "",
"payment_method_title": "",
"transaction_id": "",
"customer_ip_address": "",
"customer_user_agent": "",
"created_via": "rest-api",
"customer_note": "",
"date_completed": "2023-04-14T18:16:14",
"date_paid": "2023-04-14T18:16:14" ,
"cart_hash": "",
"number": "4597",
"meta_data": [
{
"id": 6465,
"key": "user_ns",
"value": "f12372u15376836"
},
{
"id": 6499,
"key": "_new_order_email_sent",
"value": "true"
}
],
"line_items": [
{
"id": 259,
"name": "DNK Black Shoes - blue",
"product_id": 375,
"variation_id": 4120,
"quantity": 2,
"tax_class": "",
"subtotal": "350.00",
"subtotal_tax": "0.00",
"total": "350.00",
"total_tax": "0.00" ,
"taxes": [...], // 0 itens
"meta_data": [...], // 1 item
"sku": "",
"price": 175,
"image": {...}, // 2 chaves
"parent_name": "DNK Black Shoes"
}
],
"tax_lines": [
],
"shipping_lines": [
],
"fee_lines": [
],
"coupon_lines": [
],
"refunds": [
],
"payment_url": "https://shop.businessautomated.io/checkout-2/order-pay/4597?pay_for_order=true&key=wc_order_5hKQmDkxUiesi",
"is_editable": false,
"needs_payment": false,
"needs_processing": true,
"date_created_gmt": "2023-04-14T11:01:51",
"date_modified_gmt": "2023-04-14T18:16:14",
"date_completed_gmt": "2023-04-14T18:16:14",
"date_paid_gmt": "2023-04-14T18:16:14",
"currency_symbol": "$"
}
{
"id": 4597,
"parent_id": 0,
"status": "completed",
"currency": "AUD",
"version": "6.9.4",
"prices_include_tax": false,
"date_created": "2023-04-14T11:01:51",
"date_modified": "2023-04-14T18:16:14",
"discount_total": "0.00",
"discount_tax": "0.00",
"shipping_total": "0.00",
"shipping_tax": "0.00",
"cart_tax": "0.00",
"total": "350.00",
"total_tax": "0.00",
"customer_id": 0,
"order_key": "wc_order_5hKQmDkxUiesi",
"billing": {
"first_name": "Hammad",
"last_name": "Siddiqui",
"company": "",
"address_1": "ABC Road, Garden City",
"address_2": "",
"city": "Karachi ",
"state": "Sindh",
"postcode": "",
"country": "Paquistão",
"email": "dsiddiqui788@gmail.com",
"phone": "+9230302320964"
},
"shipping": {
"first_name": "Hammad",
"last_name": "Siddiqui",
"company": "",
"address_1": "ABC Road, Garden City",
"address_2": "",
"city": "Karachi ",
"state": "Sindh",
"postcode": "",
"country": "Paquistão",
"phone":""
},
"payment_method": "",
"payment_method_title": "",
"transaction_id": "",
"customer_ip_address": "",
"customer_user_agent": "",
"created_via": "rest-api",
"customer_note": "",
"date_completed": "2023-04-14T18:16:14",
"date_paid": "2023-04-14T18:16:14" ,
"cart_hash": "",
"number": "4597",
"meta_data": [
{
"id": 6465,
"key": "user_ns",
"value": "f12372u15376836"
},
{
"id": 6499,
"key": "_new_order_email_sent",
"value": "true"
}
],
"line_items": [
{
"id": 259,
"name": "DNK Black Shoes - blue",
"product_id": 375,
"variation_id": 4120,
"quantity": 2,
"tax_class": "",
"subtotal": "350.00",
"subtotal_tax": "0.00",
"total": "350.00",
"total_tax": "0.00" ,
"taxes": [...], // 0 itens
"meta_data": [...], // 1 item
"sku": "",
"price": 175,
"image": {...}, // 2 chaves
"parent_name": "DNK Black Shoes"
}
],
"tax_lines": [
],
"shipping_lines": [
],
"fee_lines": [
],
"coupon_lines": [
],
"refunds": [
],
"payment_url": "https://shop.businessautomated.io/checkout-2/order-pay/4597?pay_for_order=true&key=wc_order_5hKQmDkxUiesi",
"is_editable": false,
"needs_payment": false,
"needs_processing": true,
"date_created_gmt": "2023-04-14T11:01:51",
"date_modified_gmt": "2023-04-14T18:16:14",
"date_completed_gmt": "2023-04-14T18:16:14",
"date_paid_gmt": "2023-04-14T18:16:14",
"currency_symbol": "$"
}

Criar nota de pedido

Esta ação é usada para criar uma nota de pedido usando o ID do pedido.

O payload de resposta recebido é o seguinte:

{
"id": 65,
"author": "WooCommerce",
"date_created": "2023-04-14T18:21:24",
"date_created_gmt": "2023-04-14T18:21:24",
"note": "Este é um pedido de teste",
"customer_note": false
}
{
"id": 65,
"author": "WooCommerce",
"date_created": "2023-04-14T18:21:24",
"date_created_gmt": "2023-04-14T18:21:24",
"note": "Este é um pedido de teste",
"customer_note": false
}

Pesquisar produtos

Esta ação é usada para pesquisar produtos com diversos parâmetros e consultas.

O payload de resposta recebido é o seguinte:

[
{
"id": 375,
"name": "DNK Black Shoes",
"slug": "dnk-black-shoes",
"permalink": "https://shop.businessautomated.io/product/dnk-black -shoes",
"type": "variable",
"status": "publish",
"featured": false,
"catalog_visibility": "visible",
"description": "",
"short_description": "",
"sku": "",
"price": "175",
"regular_price": "",
"sale_price": "",
"date_on_sale_from": null,
"date_on_sale_from_gmt": null,
"date_on_sale_to": null,
"date_on_sale_to_gmt": null,
"on_sale": false,
"purchasable": true,
"total_sales": 30,
"virtual": false,
"downloadable": false,
"downloads": [
],
"download_limit": -1,
"download_expiry": - 1,
"external_url": "",
"button_text": "",
"tax_status": "taxable",
"tax_class": "",
"manage_stock": false,
"stock_quantity": null,
"backorders": "no",
"backorders_allowed": false,
"backordered": false,
"low_stock_amount": null,
"sold_individually": false,
"weight": "",
"dimensions": {
"length": "",
"width": "",
"height":""
},
"shipping_required": true,
"shipping_taxable": true,
"shipping_class": "",
"shipping_class_id": 0,
"reviews_allowed": true,
"average_rating": "0.00",
"rating_count": 0,
"parent_id": 0,
"purchase_note": "",
"attributes": [
],
"variations": [
4120,
4119,
4122,
4121
],
"grouped_products": [
],
"menu_order": 0,
"related_ids": [
242,
229,
86,
211,
79
],
"stock_status": "instock",
"has_options": true,
"image": "https://shop.businessautomated.io/wp-content/uploads/2021/03/sports-shoe5 .jpg"
}
]
[
{
"id": 375,
"name": "DNK Black Shoes",
"slug": "dnk-black-shoes",
"permalink": "https://shop.businessautomated.io/product/dnk-black -shoes",
"type": "variable",
"status": "publish",
"featured": false,
"catalog_visibility": "visible",
"description": "",
"short_description": "",
"sku": "",
"price": "175",
"regular_price": "",
"sale_price": "",
"date_on_sale_from": null,
"date_on_sale_from_gmt": null,
"date_on_sale_to": null,
"date_on_sale_to_gmt": null,
"on_sale": false,
"purchasable": true,
"total_sales": 30,
"virtual": false,
"downloadable": false,
"downloads": [
],
"download_limit": -1,
"download_expiry": - 1,
"external_url": "",
"button_text": "",
"tax_status": "taxable",
"tax_class": "",
"manage_stock": false,
"stock_quantity": null,
"backorders": "no",
"backorders_allowed": false,
"backordered": false,
"low_stock_amount": null,
"sold_individually": false,
"weight": "",
"dimensions": {
"length": "",
"width": "",
"height":""
},
"shipping_required": true,
"shipping_taxable": true,
"shipping_class": "",
"shipping_class_id": 0,
"reviews_allowed": true,
"average_rating": "0.00",
"rating_count": 0,
"parent_id": 0,
"purchase_note": "",
"attributes": [
],
"variations": [
4120,
4119,
4122,
4121
],
"grouped_products": [
],
"menu_order": 0,
"related_ids": [
242,
229,
86,
211,
79
],
"stock_status": "instock",
"has_options": true,
"image": "https://shop.businessautomated.io/wp-content/uploads/2021/03/sports-shoe5 .jpg"
}
]

Obter informações do produto

Esta ação é usada para buscar informações do produto usando o ID do produto.

O payload de resposta recebido é o seguinte:

{
"id": 375,
"name": "DNK Black Shoes",
"slug": "dnk-black-shoes",
"permalink": "https://shop.businessautomated.io/product/dnk-black- sapatos",
"type": "variable",
"status": "publish",
"featured": false,
"catalog_visibility": "visible",
"description": "",
"short_description": "",
"sku": "",
"price": "175",
"regular_price": "",
"sale_price": "",
"date_on_sale_from": null,
"date_on_sale_from_gmt": null,
"date_on_sale_to": null,
"date_on_sale_to_gmt": null,
"on_sale": false,
"purchasable": true,
"total_sales": 30,
"virtual": false,
"downloadable": false,
"downloads": [
],
"download_limit": -1,
"download_expiry": -1,
"external_url": "",
"button_text": "",
"tax_status": "taxable",
"tax_class": "",
"manage_stock": false,
"stock_quantity": null,
"backorders": "no",
"backorders_allowed": false,
"backordered": false,
"low_stock_amount": null,
"sold_individually": false,
"weight": "",
"dimensions": {
"length": "",
"width": "",
"height":""
},
"shipping_required": true,
"shipping_taxable": true,
"shipping_class": "",
"shipping_class_id": 0,
"reviews_allowed": true,
"average_rating": "0.00",
"rating_count": 0,
"parent_id": 0 ,
"purchase_note": "",
"attributes": [
],
"variations": [
4120,
4119,
4122,
4121
],
"grouped_products": [
],
"menu_order": 0,
"related_ids": [
247,
209,
160,
169,
109
],
"stock_status": "instock",
"has_options": true,
"image": "https://shop.businessautomated.io/wp-content/uploads/2021/03/sports-shoe5. jpg"
}
{
"id": 375,
"name": "DNK Black Shoes",
"slug": "dnk-black-shoes",
"permalink": "https://shop.businessautomated.io/product/dnk-black- sapatos",
"type": "variable",
"status": "publish",
"featured": false,
"catalog_visibility": "visible",
"description": "",
"short_description": "",
"sku": "",
"price": "175",
"regular_price": "",
"sale_price": "",
"date_on_sale_from": null,
"date_on_sale_from_gmt": null,
"date_on_sale_to": null,
"date_on_sale_to_gmt": null,
"on_sale": false,
"purchasable": true,
"total_sales": 30,
"virtual": false,
"downloadable": false,
"downloads": [
],
"download_limit": -1,
"download_expiry": -1,
"external_url": "",
"button_text": "",
"tax_status": "taxable",
"tax_class": "",
"manage_stock": false,
"stock_quantity": null,
"backorders": "no",
"backorders_allowed": false,
"backordered": false,
"low_stock_amount": null,
"sold_individually": false,
"weight": "",
"dimensions": {
"length": "",
"width": "",
"height":""
},
"shipping_required": true,
"shipping_taxable": true,
"shipping_class": "",
"shipping_class_id": 0,
"reviews_allowed": true,
"average_rating": "0.00",
"rating_count": 0,
"parent_id": 0 ,
"purchase_note": "",
"attributes": [
],
"variations": [
4120,
4119,
4122,
4121
],
"grouped_products": [
],
"menu_order": 0,
"related_ids": [
247,
209,
160,
169,
109
],
"stock_status": "instock",
"has_options": true,
"image": "https://shop.businessautomated.io/wp-content/uploads/2021/03/sports-shoe5. jpg"
}

Criar produto

Esta ação é usada para criar um produto na sua loja WooCommerce.

O payload de resposta recebido é o seguinte:

{
"id": 4600,
"name": "Produto de teste",
"slug": "test-product",
"permalink": "https://shop.businessautomated.io/product/test-product",
"type": "simple",
"status": "publish",
"featured": false,
"catalog_visibility": "visible",
"description": "este é um produto de teste",
"short_description": "",
"sku": "123456",
"price": "10",
"regular_price": "10",
"sale_price": "",
"date_on_sale_from": null,
"date_on_sale_from_gmt": null,
"date_on_sale_to": null,
"date_on_sale_to_gmt": null,
"on_sale": false,
"purchasable": true,
"total_sales": 0,
"virtual": false,
"downloadable": false,
"downloads": [
],
"download_limit": -1,
"download_expiry": -1,
"external_url": "",
"button_text": "",
"tax_status": "taxable",
"tax_class": "",
"manage_stock": false,
"stock_quantity": null,
"backorders": "no",
"backorders_allowed": false,
"backordered": false,
"low_stock_amount": null,
"sold_individually": false,
"weight": "",
"dimensions": {
"length": "",
"width": " " ,
"height": ""
},
"shipping_required": true,
"shipping_taxable": true,
"shipping_class": "",
"shipping_class_id": 0,
"reviews_allowed": true,
"average_rating": "0",
"rating_count": 0,
"parent_id":0,
"purchase_note": "",
"attributes": [
],
"variations": [
],
"grouped_products": [
],
"menu_order": 0,
"related_ids": [
109,
212,
157,
210,
229
],
"stock_status": "instock",
"has_options": false,
"image": null
}
{
"id": 4600,
"name": "Produto de teste",
"slug": "test-product",
"permalink": "https://shop.businessautomated.io/product/test-product",
"type": "simple",
"status": "publish",
"featured": false,
"catalog_visibility": "visible",
"description": "este é um produto de teste",
"short_description": "",
"sku": "123456",
"price": "10",
"regular_price": "10",
"sale_price": "",
"date_on_sale_from": null,
"date_on_sale_from_gmt": null,
"date_on_sale_to": null,
"date_on_sale_to_gmt": null,
"on_sale": false,
"purchasable": true,
"total_sales": 0,
"virtual": false,
"downloadable": false,
"downloads": [
],
"download_limit": -1,
"download_expiry": -1,
"external_url": "",
"button_text": "",
"tax_status": "taxable",
"tax_class": "",
"manage_stock": false,
"stock_quantity": null,
"backorders": "no",
"backorders_allowed": false,
"backordered": false,
"low_stock_amount": null,
"sold_individually": false,
"weight": "",
"dimensions": {
"length": "",
"width": " " ,
"height": ""
},
"shipping_required": true,
"shipping_taxable": true,
"shipping_class": "",
"shipping_class_id": 0,
"reviews_allowed": true,
"average_rating": "0",
"rating_count": 0,
"parent_id":0,
"purchase_note": "",
"attributes": [
],
"variations": [
],
"grouped_products": [
],
"menu_order": 0,
"related_ids": [
109,
212,
157,
210,
229
],
"stock_status": "instock",
"has_options": false,
"image": null
}

Atualizar produto

Esta ação é usada para atualizar os detalhes do produto usando o ID do produto.

O payload de resposta recebido é o seguinte:

{
"id": 4600,
"name": "Produto de teste",
"slug": "test-product",
"permalink": "https://shop.businessautomated.io/?post_type=product&p=4600",
"type": "simple",
"status": "pending",
"featured": false,
"catalog_visibility": "visible",
"description": "este é um produto de teste",
"short_description": "",
"sku": "123456",
"price": "10",
"regular_price": "10",
"sale_price": "",
"date_on_sale_from": null,
"date_on_sale_from_gmt": null,
"date_on_sale_to": null,
"date_on_sale_to_gmt": null,
"on_sale": false,
"purchasable": true,
"total_sales": 0,
"virtual": false,
"downloadable": false,
"downloads": [
],
"download_limit": -1,
"download_expiry": -1,
"external_url": "",
"button_text": "",
"tax_status": "taxable",
"tax_class": "",
"manage_stock": false,
"stock_quantity": null,
"backorders": "no",
"backorders_allowed": false,
"backordered": false,
"low_stock_amount": null,
"sold_individually": false,
"weight": "",
"dimensions": {
"length": "",
"width": "" ,
"height": ""
},
"shipping_required": true,
"shipping_taxable": true,
"shipping_class": "",
"shipping_class_id": 0,
"reviews_allowed": true,
"average_rating": "0",
"rating_count": 0,
"parent_id":0,
"purchase_note": "",
"attributes": [
],
"variations": [
],
"grouped_products": [
],
"menu_order": 0,
"related_ids": [
252,
86,
247,
95,
242
],
"stock_status": "instock",
"has_options": false,
"image": null
}
{
"id": 4600,
"name": "Produto de teste",
"slug": "test-product",
"permalink": "https://shop.businessautomated.io/?post_type=product&p=4600",
"type": "simple",
"status": "pending",
"featured": false,
"catalog_visibility": "visible",
"description": "este é um produto de teste",
"short_description": "",
"sku": "123456",
"price": "10",
"regular_price": "10",
"sale_price": "",
"date_on_sale_from": null,
"date_on_sale_from_gmt": null,
"date_on_sale_to": null,
"date_on_sale_to_gmt": null,
"on_sale": false,
"purchasable": true,
"total_sales": 0,
"virtual": false,
"downloadable": false,
"downloads": [
],
"download_limit": -1,
"download_expiry": -1,
"external_url": "",
"button_text": "",
"tax_status": "taxable",
"tax_class": "",
"manage_stock": false,
"stock_quantity": null,
"backorders": "no",
"backorders_allowed": false,
"backordered": false,
"low_stock_amount": null,
"sold_individually": false,
"weight": "",
"dimensions": {
"length": "",
"width": "" ,
"height": ""
},
"shipping_required": true,
"shipping_taxable": true,
"shipping_class": "",
"shipping_class_id": 0,
"reviews_allowed": true,
"average_rating": "0",
"rating_count": 0,
"parent_id":0,
"purchase_note": "",
"attributes": [
],
"variations": [
],
"grouped_products": [
],
"menu_order": 0,
"related_ids": [
252,
86,
247,
95,
242
],
"stock_status": "instock",
"has_options": false,
"image": null
}

Excluir produto

Esta ação é usada para excluir um produto usando o ID do produto.

O payload de resposta recebido é o seguinte:

{
"id": 4600,
"name": "Produto de teste",
"slug": "test-product",
"permalink": "https://shop.businessautomated.io/?post_type=product&p=4600",
"date_created": "2023-04-15T01:02:07",
"date_created_gmt": "2023-04-15T01:02:07",
"date_modified": "2023-04-15T01:03:28",
"date_modified_gmt": "2023-04-15T01:03:28",
"type": "simple",
"status": "pending",
"featured": false,
"catalog_visibility": "visible",
"description": "isto é um produto de teste",
"short_description": "",
"sku": "123456",
"price": "10",
"regular_price": "10",
"sale_price": "",
"date_on_sale_from": null,
"date_on_sale_from_gmt": null,
"date_on_sale_to": null,
"date_on_sale_to_gmt": null,
"on_sale": false,
"purchasable": true,
"total_sales": 0,
"virtual": false,
"downloadable": false,
"downloads": [
],
"download_limit": -1,
"download_expiry": -1,
"external_url": "",
"button_text": "",
"tax_status": "taxable",
"tax_class": "",
"manage_stock": false,
"stock_quantity": null,
"backorders": "no",
"backorders_allowed": false,
"backordered": false ,
"low_stock_amount": null,
"sold_individually": false,
"weight": "",
"dimensions": {
"length": "",
"width": "",
"height": ""
},
"shipping_required": verdadeiro,
"shipping_taxable": verdadeiro ,
"shipping_class": "",
"shipping_class_id": 0,
"reviews_allowed": true,
"average_rating": "0",
"rating_count": 0,
"upsell_ids": [
],
"cross_sell_ids": [
],
"parent_id": 0,
"purchase_note": "",
"categories": [
{
"id": 49,
"name": "Women",
"slug": "women"
}
],
"tags": [
{
"id": 57,
"name": "Produto de teste",
"slug": "test-product"
}
],
"images": [
],
"attributes": [ ]
,
"default_attributes": [
],
"variations": [
],
"grouped_products": [
],
"menu_order": 0,
"price_html": "<span class=" woocommerce-Price-amount amount "><bdi><span class=" woocommerce-Price-currencySymbol ">$;</span>10.00</bdi></span>",
"related_ids": [
160,
157,
194,
210,
252
],
"meta_data": [
],
"stock_status": "instock",
"has_options": falso
}
{
"id": 4600,
"name": "Produto de teste",
"slug": "test-product",
"permalink": "https://shop.businessautomated.io/?post_type=product&p=4600",
"date_created": "2023-04-15T01:02:07",
"date_created_gmt": "2023-04-15T01:02:07",
"date_modified": "2023-04-15T01:03:28",
"date_modified_gmt": "2023-04-15T01:03:28",
"type": "simple",
"status": "pending",
"featured": false,
"catalog_visibility": "visible",
"description": "isto é um produto de teste",
"short_description": "",
"sku": "123456",
"price": "10",
"regular_price": "10",
"sale_price": "",
"date_on_sale_from": null,
"date_on_sale_from_gmt": null,
"date_on_sale_to": null,
"date_on_sale_to_gmt": null,
"on_sale": false,
"purchasable": true,
"total_sales": 0,
"virtual": false,
"downloadable": false,
"downloads": [
],
"download_limit": -1,
"download_expiry": -1,
"external_url": "",
"button_text": "",
"tax_status": "taxable",
"tax_class": "",
"manage_stock": false,
"stock_quantity": null,
"backorders": "no",
"backorders_allowed": false,
"backordered": false ,
"low_stock_amount": null,
"sold_individually": false,
"weight": "",
"dimensions": {
"length": "",
"width": "",
"height": ""
},
"shipping_required": verdadeiro,
"shipping_taxable": verdadeiro ,
"shipping_class": "",
"shipping_class_id": 0,
"reviews_allowed": true,
"average_rating": "0",
"rating_count": 0,
"upsell_ids": [
],
"cross_sell_ids": [
],
"parent_id": 0,
"purchase_note": "",
"categories": [
{
"id": 49,
"name": "Women",
"slug": "women"
}
],
"tags": [
{
"id": 57,
"name": "Produto de teste",
"slug": "test-product"
}
],
"images": [
],
"attributes": [ ]
,
"default_attributes": [
],
"variations": [
],
"grouped_products": [
],
"menu_order": 0,
"price_html": "<span class=" woocommerce-Price-amount amount "><bdi><span class=" woocommerce-Price-currencySymbol ">$;</span>10.00</bdi></span>",
"related_ids": [
160,
157,
194,
210,
252
],
"meta_data": [
],
"stock_status": "instock",
"has_options": falso
}

Pesquisar variantes de produtos

Esta ação é usada para pesquisar variantes de produtos com base em vários filtros.

O payload de resposta recebido é o seguinte:

[
{
"id": 4122,
"date_created": "2022-08-17T08:01:49",
"date_created_gmt": "2022-08-17T08:01:49",
"date_modified": "2022-08-17T08:01:49",
"date_modified_gmt": "2022-08-17T08:01:49",
"description": "",
"permalink": "https://shop.businessautomated.io/product/dnk-black- sapatos?attribute_pa_color=red",
"sku": "",
"price": "195",
"regular_price": "195",
"sale_price": "",
"date_on_sale_from": null,
"date_on_sale_from_gmt": null,
"date_on_sale_to": null,
"date_on_sale_to_gmt": null,
"on_sale": false,
"status": "publish",
"purchasable": true,
"virtual": false,
"downloadable": false,
"downloads": [
],
"download_limit": -1,
"download_expiry": -1,
"tax_status": "taxable",
"tax_class": "",
"manage_stock": false,
"stock_quantity": null,
"stock_status": "instock",
"backorders": "no",
"backorders_allowed": false,
"backordered": false,
"low_stock_amount": null,
"weight": "",
"dimensions": {
"length": "",
"width": "",
"height": ""
},
"shipping_class": "",
"shipping_class_id": 0,
"image": {
"id":2462,
"date_created": "2021-03-05T07:22:32",
"date_created_gmt": "2021-03-05T07:22:32",
"date_modified": "2021-03-05T07:22:32",
"date_modified_gmt": "2021-03-05T07:22:32",
"src": "https://shop.businessautomated.io/wp-content/uploads/2021/03/sports-shoe2.jpg",
"name": "sports-shoe2",
"alt": ""
},
"attributes": [
{...} // 3 teclas
],
"menu_order": 3,
"meta_data": [
{...}, // 3 chaves
{...}, // 3 chaves
{...} // 3 chaves
],
"_links": {
"self": [...], // 1 item
"collection": [...], // 1 item
"up": [...] // 1 item
}
}
]
[
{
"id": 4122,
"date_created": "2022-08-17T08:01:49",
"date_created_gmt": "2022-08-17T08:01:49",
"date_modified": "2022-08-17T08:01:49",
"date_modified_gmt": "2022-08-17T08:01:49",
"description": "",
"permalink": "https://shop.businessautomated.io/product/dnk-black- sapatos?attribute_pa_color=red",
"sku": "",
"price": "195",
"regular_price": "195",
"sale_price": "",
"date_on_sale_from": null,
"date_on_sale_from_gmt": null,
"date_on_sale_to": null,
"date_on_sale_to_gmt": null,
"on_sale": false,
"status": "publish",
"purchasable": true,
"virtual": false,
"downloadable": false,
"downloads": [
],
"download_limit": -1,
"download_expiry": -1,
"tax_status": "taxable",
"tax_class": "",
"manage_stock": false,
"stock_quantity": null,
"stock_status": "instock",
"backorders": "no",
"backorders_allowed": false,
"backordered": false,
"low_stock_amount": null,
"weight": "",
"dimensions": {
"length": "",
"width": "",
"height": ""
},
"shipping_class": "",
"shipping_class_id": 0,
"image": {
"id":2462,
"date_created": "2021-03-05T07:22:32",
"date_created_gmt": "2021-03-05T07:22:32",
"date_modified": "2021-03-05T07:22:32",
"date_modified_gmt": "2021-03-05T07:22:32",
"src": "https://shop.businessautomated.io/wp-content/uploads/2021/03/sports-shoe2.jpg",
"name": "sports-shoe2",
"alt": ""
},
"attributes": [
{...} // 3 teclas
],
"menu_order": 3,
"meta_data": [
{...}, // 3 chaves
{...}, // 3 chaves
{...} // 3 chaves
],
"_links": {
"self": [...], // 1 item
"collection": [...], // 1 item
"up": [...] // 1 item
}
}
]

Obter informações da variante do produto

Esta ação é usada para buscar informações de uma variante usando o ID da variante e o ID do produto.

O payload de resposta recebido é o seguinte:

{
"id": 4122,
"date_created": "2022-08-17T08:01:49",
"date_created_gmt": "2022-08-17T08:01:49",
"date_modified": "2022-08-17T08:01:49",
"date_modified_gmt": "2022-08-17T08:01:49",
"description": "",
"permalink": "https://shop.businessautomated.io/product/dnk-black-shoes ?attribute_pa_color=red",
"sku": "",
"price": "195",
"regular_price": "195",
"sale_price": "",
"date_on_sale_from": null,
"date_on_sale_from_gmt": null,
"date_on_sale_to": null,
"date_on_sale_to_gmt": null,
"on_sale": false,
"status": "publish",
"purchasable": true,
"virtual": false,
"downloadable": false,
"downloads": [
],
"download_limit": -1,
"download_expiry": -1,
"tax_status": "taxable",
"tax_class": "",
"manage_stock": false,
"stock_quantity": null,
"stock_status": "instock",
"backorders": "no",
"backorders_allowed": false,
"backordered": false,
"low_stock_amount": null,
"weight": "",
"dimensions": {
"length": "",
"width": "",
"height": ""
},
"shipping_class": "",
"shipping_class_id": 0,
"image": {
"id": 2462 ,
"date_created": "2021-03-05T07:22:32",
"date_created_gmt": "2021-03-05T07:22:32",
"date_modified": "2021-03-05T07:22:32",
"date_modified_gmt": "2021-03-05T07:22:32",
"src": "https://shop.businessautomated.io/wp-content/uploads/2021/03/sports-shoe2.jpg",
"name": "calçado esportivo2",
"alt": ""
},
"attributes": [
{
"id": 0,
"name": "cor",
"option": "vermelho"
}
],
"menu_order": 3,
"meta_data": [
{
"id": 3030,
"key": "_wxr_import_user_slug",
"value": "alex"
},
{
"id": 3031,
"key": "_astra_sites_imported_post",
"value": "1"
},
{
"id": 3032,
"key": "_astra_sites_enable_for_batch",
"value": "1"
}
]
}
{
"id": 4122,
"date_created": "2022-08-17T08:01:49",
"date_created_gmt": "2022-08-17T08:01:49",
"date_modified": "2022-08-17T08:01:49",
"date_modified_gmt": "2022-08-17T08:01:49",
"description": "",
"permalink": "https://shop.businessautomated.io/product/dnk-black-shoes ?attribute_pa_color=red",
"sku": "",
"price": "195",
"regular_price": "195",
"sale_price": "",
"date_on_sale_from": null,
"date_on_sale_from_gmt": null,
"date_on_sale_to": null,
"date_on_sale_to_gmt": null,
"on_sale": false,
"status": "publish",
"purchasable": true,
"virtual": false,
"downloadable": false,
"downloads": [
],
"download_limit": -1,
"download_expiry": -1,
"tax_status": "taxable",
"tax_class": "",
"manage_stock": false,
"stock_quantity": null,
"stock_status": "instock",
"backorders": "no",
"backorders_allowed": false,
"backordered": false,
"low_stock_amount": null,
"weight": "",
"dimensions": {
"length": "",
"width": "",
"height": ""
},
"shipping_class": "",
"shipping_class_id": 0,
"image": {
"id": 2462 ,
"date_created": "2021-03-05T07:22:32",
"date_created_gmt": "2021-03-05T07:22:32",
"date_modified": "2021-03-05T07:22:32",
"date_modified_gmt": "2021-03-05T07:22:32",
"src": "https://shop.businessautomated.io/wp-content/uploads/2021/03/sports-shoe2.jpg",
"name": "calçado esportivo2",
"alt": ""
},
"attributes": [
{
"id": 0,
"name": "cor",
"option": "vermelho"
}
],
"menu_order": 3,
"meta_data": [
{
"id": 3030,
"key": "_wxr_import_user_slug",
"value": "alex"
},
{
"id": 3031,
"key": "_astra_sites_imported_post",
"value": "1"
},
{
"id": 3032,
"key": "_astra_sites_enable_for_batch",
"value": "1"
}
]
}

Pesquisar categorias

Esta ação é usada para buscar categorias usando vários parâmetros e consultas.

O payload de resposta recebido é o seguinte:

[
{
"id": 49,
"name": "Women",
"slug": "women",
"parent": 0,
"description": " Nam nec Tellus a odio tincidunt auctor a ornare odio. Sed non mauris vitae erat consequat auctor eu in elit. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Mauris in erat justo. Nullam ac urna eu felis dapibus condimentum sit amet a augue. Sed non neque elit sed ut. ",
"display": "default",
"image": {
"id": 500,
"date_created": "2018-12-06T05:50:12",
"date_created_gmt": "2018-12-06T05:50:12",
"date_modified": "2022-10-06T23:57:20",
"date_modified_gmt": "2022-10-06T23:57:20",
"src": "https://shop.businessautomated.io/wp-content/ uploads/2018/12/women-fashion-free-img.jpg",
"name": "women-fashion-free-img",
"alt": ""
},
"menu_order": 0,
"count": 17,
"_links": {
"self": [...], // 1 item
"collection": [...] // 1 item
}
}
]
[
{
"id": 49,
"name": "Women",
"slug": "women",
"parent": 0,
"description": " Nam nec Tellus a odio tincidunt auctor a ornare odio. Sed non mauris vitae erat consequat auctor eu in elit. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Mauris in erat justo. Nullam ac urna eu felis dapibus condimentum sit amet a augue. Sed non neque elit sed ut. ",
"display": "default",
"image": {
"id": 500,
"date_created": "2018-12-06T05:50:12",
"date_created_gmt": "2018-12-06T05:50:12",
"date_modified": "2022-10-06T23:57:20",
"date_modified_gmt": "2022-10-06T23:57:20",
"src": "https://shop.businessautomated.io/wp-content/ uploads/2018/12/women-fashion-free-img.jpg",
"name": "women-fashion-free-img",
"alt": ""
},
"menu_order": 0,
"count": 17,
"_links": {
"self": [...], // 1 item
"collection": [...] // 1 item
}
}
]

Obter informações da categoria

Esta ação é usada para buscar informações para uma categoria usando seu ID de categoria.

O payload de resposta recebido é o seguinte:

[
{
"id": 49,
"name": "Women",
"slug": "women",
"parent": 0,
"description": " Nam nec Tellus a odio tincidunt auctor a ornare odio. Sed non mauris vitae erat consequat auctor eu in elit. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Mauris in erat justo. Nullam ac urna eu felis dapibus condimentum sit amet a augue. Sed non neque elit sed ut. ",
"display": "default",
"image": {
"id": 500,
"date_created": "2018-12-06T05:50:12",
"date_created_gmt": "2018-12-06T05:50:12",
"date_modified": "2022-10-06T23:57:20",
"date_modified_gmt": "2022-10-06T23:57:20",
"src": "https://shop.businessautomated.io/wp-content/ uploads/2018/12/women-fashion-free-img.jpg",
"name": "women-fashion-free-img",
"alt": ""
},
"menu_order": 0,
"count": 17,
"_links": {
"self": [...], // 1 item
"collection": [...] // 1 item
}
}
]
[
{
"id": 49,
"name": "Women",
"slug": "women",
"parent": 0,
"description": " Nam nec Tellus a odio tincidunt auctor a ornare odio. Sed non mauris vitae erat consequat auctor eu in elit. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Mauris in erat justo. Nullam ac urna eu felis dapibus condimentum sit amet a augue. Sed non neque elit sed ut. ",
"display": "default",
"image": {
"id": 500,
"date_created": "2018-12-06T05:50:12",
"date_created_gmt": "2018-12-06T05:50:12",
"date_modified": "2022-10-06T23:57:20",
"date_modified_gmt": "2022-10-06T23:57:20",
"src": "https://shop.businessautomated.io/wp-content/ uploads/2018/12/women-fashion-free-img.jpg",
"name": "women-fashion-free-img",
"alt": ""
},
"menu_order": 0,
"count": 17,
"_links": {
"self": [...], // 1 item
"collection": [...] // 1 item
}
}
]

Obter informações da tag do produto

Esta ação é usada para buscar informações de tags de produtos usando o ID da tag.

O payload de resposta recebido é o seguinte:

[
{
"id": 49,
"name": "Women",
"slug": "women",
"parent": 0,
"description": " Nam nec Tellus a odio tincidunt auctor a ornare odio. Sed non mauris vitae erat consequat auctor eu in elit. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Mauris in erat justo. Nullam ac urna eu felis dapibus condimentum sit amet a augue. Sed non neque elit sed ut. ",
"display": "default",
"image": {
"id": 500,
"date_created": "2018-12-06T05:50:12",
"date_created_gmt": "2018-12-06T05:50:12",
"date_modified": "2022-10-06T23:57:20",
"date_modified_gmt": "2022-10-06T23:57:20",
"src": "https://shop.businessautomated.io/wp-content/ uploads/2018/12/women-fashion-free-img.jpg",
"name": "women-fashion-free-img",
"alt": ""
},
"menu_order": 0,
"count": 17,
"_links": {
"self": [...], // 1 item
"collection": [...] // 1 item
}
}
]
[
{
"id": 49,
"name": "Women",
"slug": "women",
"parent": 0,
"description": " Nam nec Tellus a odio tincidunt auctor a ornare odio. Sed non mauris vitae erat consequat auctor eu in elit. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Mauris in erat justo. Nullam ac urna eu felis dapibus condimentum sit amet a augue. Sed non neque elit sed ut. ",
"display": "default",
"image": {
"id": 500,
"date_created": "2018-12-06T05:50:12",
"date_created_gmt": "2018-12-06T05:50:12",
"date_modified": "2022-10-06T23:57:20",
"date_modified_gmt": "2022-10-06T23:57:20",
"src": "https://shop.businessautomated.io/wp-content/ uploads/2018/12/women-fashion-free-img.jpg",
"name": "women-fashion-free-img",
"alt": ""
},
"menu_order": 0,
"count": 17,
"_links": {
"self": [...], // 1 item
"collection": [...] // 1 item
}
}
]

Criar tag de produto

Esta ação é usada para criar uma tag de produto.

O payload de resposta recebido é o seguinte:

{
"id": 57,
"name": "Produto de teste",
"slug": "test-product",
"description": "este é um produto de teste",
"count": 0
}
{
"id": 57,
"name": "Produto de teste",
"slug": "test-product",
"description": "este é um produto de teste",
"count": 0
}

Listar todos os métodos de envio

Esta ação é usada para listar todos os métodos de envio disponíveis para a loja.

O payload de resposta recebido é o seguinte:

[
{
"id": "flat_rate",
"title": "Taxa fixa",
"description": "Permite cobrar uma taxa fixa pelo frete.",
"_links": {
"self": [...], // 1 item
"collection": [...] // 1 item
}
},
{
"id": "free_shipping",
"title": " Frete grátis",
"description": "Frete grátis é um método especial que pode ser acionado com cupons e gastos mínimos.",
"_links": {
"self": [...], // 1 item
"collection": [...] // 1 item
}
},
{
"id": "local_pickup",
"title": " Retirada local",
"description": "Permitir que os próprios clientes retirem os pedidos. Por padrão, ao usar a loja de retirada local, os impostos básicos serão aplicados independentemente do endereço do cliente.",
"_links": {
"self": [...], // 1 item
"collection": [...] // 1 item
}
}
]
[
{
"id": "flat_rate",
"title": "Taxa fixa",
"description": "Permite cobrar uma taxa fixa pelo frete.",
"_links": {
"self": [...], // 1 item
"collection": [...] // 1 item
}
},
{
"id": "free_shipping",
"title": " Frete grátis",
"description": "Frete grátis é um método especial que pode ser acionado com cupons e gastos mínimos.",
"_links": {
"self": [...], // 1 item
"collection": [...] // 1 item
}
},
{
"id": "local_pickup",
"title": " Retirada local",
"description": "Permitir que os próprios clientes retirem os pedidos. Por padrão, ao usar a loja de retirada local, os impostos básicos serão aplicados independentemente do endereço do cliente.",
"_links": {
"self": [...], // 1 item
"collection": [...] // 1 item
}
}
]

Criar avaliação de produto

Esta ação é usada para criar uma avaliação de um produto.

O payload de resposta recebido é o seguinte:

{
"id": 66,
"date_created": "2023-04-15T02:02:44",
"date_created_gmt": "2023-04-15T02:02:44",
"product_id": 375,
"product_name": " DNK Black Shoes",
"product_permalink": "https://shop.businessautomated.io/product/dnk-black-shoes",
"status": "approved",
"reviewer": "John Jigga",
"reviewer_email": "jia69@gmail.com",
"review": "Este é um produto muito bom, eu gosto",
"rating": 4,
"verified": false,
"reviewer_avatar_urls": {
"24": "https:// secure.gravatar.com/avatar/fbe4f4181cb19f28ab07c9b4967048ab?s=24&d=mm&r=g",
"48": "https://secure.gravatar.com/avatar/fbe4f4181cb19f28ab07c9b4967048ab?s=48&d=mm&r=g",
"96": "https://secure.gravatar.com/avatar/fbe4f4181cb19f28ab07c9b4967048ab?s=96&d=mm&r=g"
}
}
{
"id": 66,
"date_created": "2023-04-15T02:02:44",
"date_created_gmt": "2023-04-15T02:02:44",
"product_id": 375,
"product_name": " DNK Black Shoes",
"product_permalink": "https://shop.businessautomated.io/product/dnk-black-shoes",
"status": "approved",
"reviewer": "John Jigga",
"reviewer_email": "jia69@gmail.com",
"review": "Este é um produto muito bom, eu gosto",
"rating": 4,
"verified": false,
"reviewer_avatar_urls": {
"24": "https:// secure.gravatar.com/avatar/fbe4f4181cb19f28ab07c9b4967048ab?s=24&d=mm&r=g",
"48": "https://secure.gravatar.com/avatar/fbe4f4181cb19f28ab07c9b4967048ab?s=48&d=mm&r=g",
"96": "https://secure.gravatar.com/avatar/fbe4f4181cb19f28ab07c9b4967048ab?s=96&d=mm&r=g"
}
}

Pesquisar avaliações de produtos

Esta ação é usada para buscar avaliações de produtos com diversos filtros e parâmetros.

O payload de resposta recebido é o seguinte:

[
{
"id": 66,
"date_created": "2023-04-15T02:02:44",
"date_created_gmt": "2023-04-15T02:02:44",
"product_id": 375,
"product_name": "DNK Black Shoes",
"product_permalink": "https://shop.businessautomated.io/product/dnk-black-shoes",
"status": "approved",
"reviewer": "John Jigga",
"reviewer_email": "ja69@gmail.com",
"review": "<p>Este é um produto muito bom, eu gosto</p> ",
"rating": 4,
"verified": false,
"reviewer_avatar_urls": {
"24": "https://secure.gravatar.com/avatar/fbe4f4181cb19f28ab07c9b4967048ab?s=24&d=mm&r=g",
"48": "https://secure.gravatar.com/avatar/fbe4f4181cb19f28ab07c9b4967048ab?s=48& d = mm&r=g",
"96": "https://secure.gravatar.com/avatar/fbe4f4181cb19f28ab07c9b4967048ab?s=96&d=mm&r=g"
},
"_links": {
"self": [...], / / 1 item
"collection": [...], // 1 item
"up": [...] // 1 item
}
}
]
[
{
"id": 66,
"date_created": "2023-04-15T02:02:44",
"date_created_gmt": "2023-04-15T02:02:44",
"product_id": 375,
"product_name": "DNK Black Shoes",
"product_permalink": "https://shop.businessautomated.io/product/dnk-black-shoes",
"status": "approved",
"reviewer": "John Jigga",
"reviewer_email": "ja69@gmail.com",
"review": "<p>Este é um produto muito bom, eu gosto</p> ",
"rating": 4,
"verified": false,
"reviewer_avatar_urls": {
"24": "https://secure.gravatar.com/avatar/fbe4f4181cb19f28ab07c9b4967048ab?s=24&d=mm&r=g",
"48": "https://secure.gravatar.com/avatar/fbe4f4181cb19f28ab07c9b4967048ab?s=48& d = mm&r=g",
"96": "https://secure.gravatar.com/avatar/fbe4f4181cb19f28ab07c9b4967048ab?s=96&d=mm&r=g"
},
"_links": {
"self": [...], / / 1 item
"collection": [...], // 1 item
"up": [...] // 1 item
}
}
]

Gatilhos nativos do WooCommerce

O WooCommerce se integra nativamente ao NicoChat para fornecer gatilhos de webhook. Esses gatilhos disparam sempre que um evento acontece na loja WooCommerce, seja por uma API, seja diretamente na loja.

O WooCommerce oferece suporte aos seguintes gatilhos nativos.

Criação de pedidos

Este gatilho dispara sempre que um pedido é criado na loja WooCommerce, seja por uma API, seja diretamente na loja.

O payload de resposta recebido é o seguinte:

{
"id": 4599,
"parent_id": 0,
"status": "pending",
"currency": "AUD",
"version": "6.9.4",
"prices_include_tax": false,
"date_created": "2023-04-14T18:13:13",
"date_modified": "2023-04-14T18:13:13",
"discount_total": "0.00",
"discount_tax": "0.00",
"shipping_total": "0.00",
"shipping_tax": "0.00",
"cart_tax": "0.00",
"total": "175.00",
"total_tax": "0.00",
"customer_id": 4,
"order_key": "wc_order_yhGfOfZ0eoCYe",
"billing": {
"first_name": "",
"last_name": "",
"company": "",
"address_1": "",
"address_2": "",
"city": "",
"state": "",
"postcode": "",
"country": "",
"email": "mark@NicoChat.com",
"phone": ""
},
"shipping": {
"first_name": "",
"last_name": "",
"company": "",
"address_1": "",
"address_2": "",
"city": "",
"state": "",
"postcode": "",
"country": "",
"phone": ""
},
"payment_method": "" ,
"payment_method_title": "",
"transaction_id": "",
"customer_ip_address": "",
"customer_user_agent": "",
"created_via": "rest-api",
"customer_note": "",
"date_completed": null,
"date_paid": null,
"cart_hash": "",
"number": "4599",
"meta_data": [
],
"line_items": [
{
"id": 260,
"name": "Sapatos Pretos DNK - azul",
"product_id": 375,
"variation_id": 4120,
"quantity": 1,
"tax_class": "",
"subtotal": "175.00",
"subtotal_tax": "0.00",
"total": "175.00",
"total_tax": "0.00",
"taxes": [...], // 0 itens
"meta_data": [...], // 1 item
"sku": "",
"price": 175,
"image": {...}, // 2 chaves
"parent_name": "DNK Black Shoes"
}
],
"tax_lines": [
],
"shipping_lines": [
],
"fee_lines": [
],
"coupon_lines": [
],
"refunds": [
],
"payment_url": "https://shop.businessautomated.io/checkout-2/order-pay /4599?pay_for_order=true&key=wc_order_yhGfOfZ0eoCYe",
"is_editable": true,
"needs_payment": true,
"needs_processing": true,
"date_created_gmt": "2023-04-14T18:13:13",
"date_modified_gmt": "2023-04-14T18:13:13",
"date_completed_gmt": null,
"date_paid_gmt": null,
"currency_symbol": "$"
}
{
"id": 4599,
"parent_id": 0,
"status": "pending",
"currency": "AUD",
"version": "6.9.4",
"prices_include_tax": false,
"date_created": "2023-04-14T18:13:13",
"date_modified": "2023-04-14T18:13:13",
"discount_total": "0.00",
"discount_tax": "0.00",
"shipping_total": "0.00",
"shipping_tax": "0.00",
"cart_tax": "0.00",
"total": "175.00",
"total_tax": "0.00",
"customer_id": 4,
"order_key": "wc_order_yhGfOfZ0eoCYe",
"billing": {
"first_name": "",
"last_name": "",
"company": "",
"address_1": "",
"address_2": "",
"city": "",
"state": "",
"postcode": "",
"country": "",
"email": "mark@NicoChat.com",
"phone": ""
},
"shipping": {
"first_name": "",
"last_name": "",
"company": "",
"address_1": "",
"address_2": "",
"city": "",
"state": "",
"postcode": "",
"country": "",
"phone": ""
},
"payment_method": "" ,
"payment_method_title": "",
"transaction_id": "",
"customer_ip_address": "",
"customer_user_agent": "",
"created_via": "rest-api",
"customer_note": "",
"date_completed": null,
"date_paid": null,
"cart_hash": "",
"number": "4599",
"meta_data": [
],
"line_items": [
{
"id": 260,
"name": "Sapatos Pretos DNK - azul",
"product_id": 375,
"variation_id": 4120,
"quantity": 1,
"tax_class": "",
"subtotal": "175.00",
"subtotal_tax": "0.00",
"total": "175.00",
"total_tax": "0.00",
"taxes": [...], // 0 itens
"meta_data": [...], // 1 item
"sku": "",
"price": 175,
"image": {...}, // 2 chaves
"parent_name": "DNK Black Shoes"
}
],
"tax_lines": [
],
"shipping_lines": [
],
"fee_lines": [
],
"coupon_lines": [
],
"refunds": [
],
"payment_url": "https://shop.businessautomated.io/checkout-2/order-pay /4599?pay_for_order=true&key=wc_order_yhGfOfZ0eoCYe",
"is_editable": true,
"needs_payment": true,
"needs_processing": true,
"date_created_gmt": "2023-04-14T18:13:13",
"date_modified_gmt": "2023-04-14T18:13:13",
"date_completed_gmt": null,
"date_paid_gmt": null,
"currency_symbol": "$"
}

Atualização de pedido

Este gatilho dispara sempre que um pedido é atualizado na loja WooCommerce, seja por uma API, seja diretamente na própria loja.

O payload de resposta recebido é o seguinte:

{
"id": 4597,
"parent_id": 0,
"status": "completed",
"currency": "AUD",
"version": "6.9.4",
"prices_include_tax": false,
"date_created": "2023-04-14T11:01:51",
"date_modified": "2023-04-14T18:16:14",
"discount_total": "0.00",
"discount_tax": "0.00",
"shipping_total": "0.00",
"shipping_tax": "0.00",
"cart_tax": "0.00",
"total": "350.00",
"total_tax": "0.00",
"customer_id": 0,
"order_key": "wc_order_5hKQmDkxUiesi",
"billing": {
"first_name": "Hammad",
"last_name": "Siddiqui",
"company": "",
"address_1": "ABC Road, Garden City",
"address_2": "",
"city": "Karachi ",
"state": "Sindh",
"postcode": "",
"country": "Paquistão",
"email": "dsiddiqui788@gmail.com",
"phone": "+9230302320964"
},
"shipping": {
"first_name": "Hammad",
"last_name": "Siddiqui",
"company": "",
"address_1": "cart_hash": "", "number": "4597", "meta_data": [ { "id": 6465, "key": "user_ns", "value": "f12372u15376836" }, { "id":6499, "key": "_new_order_email_sent", "value": "true" } ], "line_items": [ { "id": 259, "name": "DNK Black Shoes - blue", "product_id": 375, "variation_id": 4120, "quantity": 2, "tax_class": "subtotal": "350.00", "subtotal_tax": "ABC Road, Garden City",
"address_2": "",
"city": "Karachi ",
"state": "Sindh",
"postcode": "",
"country": "Paquistão",
"phone":""
},
"payment_method": "",
"payment_method_title": "",
"transaction_id": "",
"customer_ip_address": "",
"customer_user_agent": "",
"created_via": "rest-api",
"customer_note": "",
"date_completed": "2023-04-14T18:16:14",
"date_paid": "2023-04-14T18:16:14" ,




















"" ,
"0.00",
"total": "350.00",
"total_tax": "0.00" ,
"taxes": [...], // 0 itens
"meta_data": [...], // 1 item
"sku": "",
"price": 175,
"image": {...}, // 2 chaves
"parent_name": "DNK Black Shoes"
}
],
"tax_lines": [
],
"shipping_lines": [
],
"fee_lines": [
],
"coupon_lines": [
],
"refunds": [
],
"payment_url": "https://shop.businessautomated.io/checkout-2/order-pay/4597?pay_for_order=true&key=wc_order_5hKQmDkxUiesi",
"is_editable": false,
"needs_payment": false,
"needs_processing": true,
"date_created_gmt": "2023-04-14T11:01:51",
"date_modified_gmt": "2023-04-14T18:16:14",
"date_completed_gmt": "2023-04-14T18:16:14",
"date_paid_gmt": "2023-04-14T18:16:14",
"currency_symbol": "$"
}
{
"id": 4597,
"parent_id": 0,
"status": "completed",
"currency": "AUD",
"version": "6.9.4",
"prices_include_tax": false,
"date_created": "2023-04-14T11:01:51",
"date_modified": "2023-04-14T18:16:14",
"discount_total": "0.00",
"discount_tax": "0.00",
"shipping_total": "0.00",
"shipping_tax": "0.00",
"cart_tax": "0.00",
"total": "350.00",
"total_tax": "0.00",
"customer_id": 0,
"order_key": "wc_order_5hKQmDkxUiesi",
"billing": {
"first_name": "Hammad",
"last_name": "Siddiqui",
"company": "",
"address_1": "ABC Road, Garden City",
"address_2": "",
"city": "Karachi ",
"state": "Sindh",
"postcode": "",
"country": "Paquistão",
"email": "dsiddiqui788@gmail.com",
"phone": "+9230302320964"
},
"shipping": {
"first_name": "Hammad",
"last_name": "Siddiqui",
"company": "",
"address_1": "cart_hash": "", "number": "4597", "meta_data": [ { "id": 6465, "key": "user_ns", "value": "f12372u15376836" }, { "id":6499, "key": "_new_order_email_sent", "value": "true" } ], "line_items": [ { "id": 259, "name": "DNK Black Shoes - blue", "product_id": 375, "variation_id": 4120, "quantity": 2, "tax_class": "subtotal": "350.00", "subtotal_tax": "ABC Road, Garden City",
"address_2": "",
"city": "Karachi ",
"state": "Sindh",
"postcode": "",
"country": "Paquistão",
"phone":""
},
"payment_method": "",
"payment_method_title": "",
"transaction_id": "",
"customer_ip_address": "",
"customer_user_agent": "",
"created_via": "rest-api",
"customer_note": "",
"date_completed": "2023-04-14T18:16:14",
"date_paid": "2023-04-14T18:16:14" ,




















"" ,
"0.00",
"total": "350.00",
"total_tax": "0.00" ,
"taxes": [...], // 0 itens
"meta_data": [...], // 1 item
"sku": "",
"price": 175,
"image": {...}, // 2 chaves
"parent_name": "DNK Black Shoes"
}
],
"tax_lines": [
],
"shipping_lines": [
],
"fee_lines": [
],
"coupon_lines": [
],
"refunds": [
],
"payment_url": "https://shop.businessautomated.io/checkout-2/order-pay/4597?pay_for_order=true&key=wc_order_5hKQmDkxUiesi",
"is_editable": false,
"needs_payment": false,
"needs_processing": true,
"date_created_gmt": "2023-04-14T11:01:51",
"date_modified_gmt": "2023-04-14T18:16:14",
"date_completed_gmt": "2023-04-14T18:16:14",
"date_paid_gmt": "2023-04-14T18:16:14",
"currency_symbol": "$"
}

Criação de contato pelos gatilhos

O NicoChat identifica as informações que vêm no payload do gatilho e as compara com os contatos existentes. Se encontrar, o fluxo é executado para esse contato. Se não encontrar, um contato é criado com as informações que vieram no payload.

Se o e-mail e o telefone estiverem disponíveis, o contato é criado no canal Web; se apenas o e-mail estiver disponível, o contato também é criado no canal Web. Se apenas o telefone estiver disponível, o contato é criado no canal WhatsApp.

Se o payload não trouxer as informações mínimas exigidas acima, o gatilho não consegue identificar nem criar um contato e, por isso, não dispara.

Configurar a automação de carrinho abandonado do WooCommerce para enviar mensagem no WhatsApp

O WooCommerce não tem um gatilho nativo de carrinho abandonado. Ainda assim, com plugins gratuitos somados ao NicoChat, você monta seu próprio fluxo de carrinho abandonado em poucos passos.

Instalando o plugin

Depois de fazer login, vá ao painel do WooCommerce e role a página até ver a aba de plugins no menu lateral esquerdo.

Clique em “Add new plugin” e digite “cart” na barra de pesquisa. Você verá vários plugins para escolher; nesta documentação vamos usar o Cartflows.

Depois de instalado, atualize a página e volte ao painel.

Integrando o plugin com o NicoChat

No painel, clique na aba WooCommerce e vá até Abandono de carrinho.

Clique na aba Configurações

A partir daqui, vamos definir as configurações do gatilho.

Primeiro, configure o intervalo do gatilho. Neste plugin, o mínimo possível é 10 minutos.

Confira também se a opção Ativar rastreamento está marcada.

Role a página até as configurações de webhook, ative a opção Habilitar webhook e cole no campo URL abaixo o webhook de entrada que você pode criar dentro do NicoChat:

Clique no exemplo de gatilho para conferir se está recebendo o payload. Feito isso, role a página e clique em “Salvar alterações”.

Fazendo um pedido e abandonando o carrinho

Acesse sua loja WooCommerce, adicione um produto ao carrinho, prossiga para a finalização da compra e saia da página depois de preencher os dados de cobrança.

Não conclua o pedido. Como configuramos o gatilho para disparar depois de 10 minutos, não esperaremos 10 minutos para receber o payload no nosso webhook de entrada dentro do NicoChat.

Configuração do Webhook de entrada

No NicoChat, vá em Ferramentas e Webhook e clique em Editar na frente do webhook que você escolheu para a configuração de carrinho abandonado.

Aguarde 10 minutos e clique em “Ouça os Dados de Payload”.

Clique em Concluído e visualize o payload. Mapeie todos os valores necessários do payload recebido.

Nota
Confira se o número de telefone está no formato correto e inclui o código do país; caso contrário, haverá problemas. O formato pode ser definido no próprio WooCommerce, e também é possível usar o Pré-processamento de Dados para formatá-lo manualmente com código JavaScript.

Feito isso, conecte o webhook ao fluxo que você quiser.

Configurando o fluxo

Vá em Conteúdo e depois em Modelos do WhatsApp. Verifique se você tem um modelo para carrinhos abandonados; se não tiver, crie um no NicoChat e obtenha a aprovação.

Vá ao criador de fluxo e monte o modelo assim:

Pronto, está tudo configurado. Você pode montar e abandonar outro carrinho para testar o fluxo.