Pedido

Filtros

Pode-se utilizar filtros para restringir o retorno de dados. São utilizados, passando um parâmetro na URL requisitada. Observe a tabela de possíveis filtros abaixo.

ParamDescriçãoTipoValoresEx
statusFiltra status do pedidostringopen, canceled, archived?status=open
payment_statusFiltra status do pagamento, pode ser agrupado por waiting, canceled ou approvedstringpending, paid, voided, approved, denied, expired, refunded, chargeback?payment_status=approved
fulfillment_statusFiltra o status Fulfillmentstringattended, invoiced, shipped, delivered?fulfillment_status=attended
marketplaceFiltrar origem de um pedidostring
?marketplace=1
current_statusFiltrar o status do pedidostring?current_status=approved
payment_methodFiltrar método de pagamento de um pedidostringbillet, creditcard, manual?payment_method=billet
customer_idFiltras pelo ID do clienteint?customer_id=1
created_atFiltrar um pedido por data de criação, possível incluir data inicial e final (opcional)stringyyyy-mm-dd[Thh-ii-ss][--yyyy-mm-dd[Thh-ii-ss]]?created_at=2018-11-01T10:06:20
updated_atFiltrar um pedido por data de atualização, possível incluir data inicial e final (opcional)stringyyyy-mm-dd[Thh-ii-ss][--yyyy-mm-dd[Thh-ii-ss]]?updated_at=2018-11-01T10:06:20--2018-11-02T10:06:20
expires_at_maxFiltra pedido pela data de expiração máxima string2019-08-05?expires_at_max=2019-
08-05
expires_atFiltra pedido com expiração atéstring2019-08-01?expires_at=2019-
08-01
?expires_at=2019-
08-01
page           navega entre as páginas retornadas em consultastring   1,2,3,4,5?page=1


Criar um Pedido

POST https://api.dooca.store/orders

Body
{
  "customer_id": 1,
  "note": null,
  "address": {
    "receiver": "FABIANA DE LIMA",
    "zipcode": "51160070",
    "street": "Rua Jorge de Lima",
    "number": "245",
    "detail": "APT 1305",
    "district": "Imbiribeira",
    "city": "Recife",
    "state": "PE"
  },
  "payment": {
    "name": "Cartão de crédito",
    "method": "creditcard",
    "parcels": "1",
    "parcel_price": "250.92",
    "card_brand": "mastercard"
  },
  "shipping": {
    "name": "PAC",
    "price": "19.93",
    "shipment_time": "0",
    "delivery_time": "14"
  },
  "items": [
    {
      "name": "SAIA JULIA LISTRADO",
      "variation": "42",
      "total": 230.99,
      "quantity": 1,
      "price": "230.99"
    }
  ]
}
Status: 201

Editar um Pedido

PUT https://api.dooca.store/orders/:id

Parâmetro: O ID do pedido.

A edição do registro pode ser parcial ou total.

Status: 200

Consultar um Pedido pelo ID

GET https://api.dooca.store/orders/:id_order

Parâmetro: O ID do pedido.

HTTP STATUS: 200 OK
{
            "id": 38,
            "external_id": null,
            "customer_id": 2,
            "code": 19,
            "type": "order",
            "total": "35.30",
            "subtotal": "25.00",
            "discount": "0.00",
            "tax": "0.00",
            "taxes": [],
            "quantity": 1,
            "status": "archived",
            "payment_status": "approved",
            "fulfillment_status": "delivered",
            "token": "PVk3UW9ShDeA4CsziILUiOcJCfUuZRENGv3A",
            "device": "desktop",
            "note": null,
            "extra": {
                "utm": null,
                "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36",
                "customer_ip": "::1"
            },
            "canceled_at": null,
            "archived_at": null,
            "created_at": "2020-02-27 14:46:54",
            "updated_at": "2020-02-28 15:49:17",
            "customer": {
                "id": 2,
                "customer_group_id": 4,
                "external_id": null,
                "email": "eduardo@dooca.com.br",
                "cgc": "02716910001",
                "name": "Luke",
                "first_name": "Luke",
                "last_name": "Skywalker",
                "birthday": "1991-02-28",
                "gender": "male",
                "phone": "51992126348",
                "entity": "individual",
                "company": null,
                "ie": null,
                "newsletter": true,
                "marketplace": false,
                "note": null,
                "image": null,
                "token": "LDlx9CgtII6mhSAYxe4glFO3dTzbBq4BMSopjzhe9r7jKCKWg4D6H8bdRylOCRuNvHBod2c772a880c0167494874bf3c914",
                "facebook_id": null,
                "active": true,
                "created_at": "2020-01-30 18:23:07",
                "updated_at": "2020-01-30 18:23:07"
            },
            "address": {
                "id": 47,
                "order_id": 38,
                "name": null,
                "receiver": "Luke",
                "zipcode": "93540205",
                "street": "Rua Sapiranga",
                "number": "1231",
                "detail": null,
                "district": "Canudos",
                "city": "Novo Hamburgo",
                "state": "RS",
                "city_ibge_id": "4313409",
                "created_at": "2020-02-27 14:46:14",
                "updated_at": "2020-02-27 14:46:14"
            },
            "payment": {
                "id": 120,
                "order_id": 38,
                "payment_id": 2,
                "gateway_id": null,
                "name": "teste",
                "method": "manual",
                "description": null,
                "external": null,
                "status": "approved",
                "parcels": 1,
                "parcel_price": "35.30",
                "interest": "0.00",
                "discount": "0.00",
                "token": null,
                "card_brand": null,
                "card_bin": null,
                "card_end": null,
                "card_cgc": null,
                "card_owner": null,
                "card_expiry_date": null,
                "url": null,
                "nsu": null,
                "digitable_line": null,
                "processed_by": null,
                "processed_at": "2020-02-27 15:02:38",
                "expires_at": null,
                "created_at": "2020-02-27 14:46:50",
                "updated_at": "2020-02-27 15:02:38"
            },
            "discounts": [],
            "shipping": null,
            "items": [
                {
                    "id": 62,
                    "order_id": 38,
                    "variation_id": null,
                    "external_id": null,
                    "product_id": null,
                    "parent_id": null,
                    "name": "testepeso",
                    "reference": null,
                    "variation": null,
                    "options": null,
                    "image": null,
                    "price": "25.00",
                    "gtin": null,
                    "sku": null,
                    "mpn": null,
                    "ncm": null,
                    "price_compare": "26.00",
                    "quantity": 1,
                    "total": "25.00",
                    "note": null,
                    "checker": null,
                    "weight": "2.000",
                    "width": null,
                    "height": null,
                    "depth": null,
                    "kit": 0,
                    "grid": null,
                    "selling_out_of_stock": 0,
                    "billet_discount": null,
                    "discount": "0.00",
                    "additional_price": "0.00",
                    "customize": null,
                    "gift_wrapping": null,
                    "is_virtual": false,
                    "is_gift": false,
                    "created_at": "2020-02-27 14:45:04",
                    "updated_at": "2020-02-27 14:45:24",
                    "url": null,
                    "components": []
                }
            ],
            "has_shipping": false,
            "fulfillment": {
                "id": 11,
                "order_id": 38,
                "status": "delivered",
                "nfe_number": "311903075862610001845500100000we481404848162",
                "nfe_token": null,
                "nfe_series": "311903075862610001845500100we92481404848162",
                "shipping_code": null,
                "shipping_track_url": null,
                "shipping_track_description": null,
                "shipping_carrier_id": null,
                "shipping_carrier": null,
                "shipping_carrier_api": null,
                "nfe_created_at": "2020-02-27 15:03:15",
                "shipping_created_at": null,
                "created_at": "2020-02-27 15:02:42",
                "updated_at": "2020-02-28 15:49:17"
            },
            "marketplace": null,
            "histories": [
                {
                    "id": 100,
                    "order_id": 38,
                    "user_id": 7,
                    "status": "open",
                    "note": null,
                    "created_at": "2020-02-27 14:46:54"
                },
                {
                    "id": 101,
                    "order_id": 38,
                    "user_id": 7,
                    "status": "pending",
                    "note": null,
                    "created_at": "2020-02-27 14:46:54"
                },
                {
                    "id": 102,
                    "order_id": 38,
                    "user_id": 6,
                    "status": "approved",
                    "note": null,
                    "created_at": "2020-02-27 15:02:38"
                },
                {
                    "id": 103,
                    "order_id": 38,
                    "user_id": 6,
                    "status": "attended",
                    "note": null,
                    "created_at": "2020-02-27 15:02:42"
                },
                {
                    "id": 104,
                    "order_id": 38,
                    "user_id": 6,
                    "status": "invoiced",
                    "note": null,
                    "created_at": "2020-02-27 15:03:15"
                },
                {
                    "id": 112,
                    "order_id": 38,
                    "user_id": 6,
                    "status": "delivered",
                    "note": null,
                    "created_at": "2020-02-28 15:49:17"
                },
                {
                    "id": 113,
                    "order_id": 38,
                    "user_id": 6,
                    "status": "archived",
                    "note": null,
                    "created_at": "2020-02-28 15:49:17"
                }
            ]
          
       }

Consultar um Pedido pelo TOKEN

GET https://api.dooca.store/orders/token/:token

Parâmetro: O TOKEN do pedido.

HTTP STATUS: 200 OK
HTTP STATUS: 200 OK
{
            "id": 38,
            "external_id": null,
            "customer_id": 2,
            "code": 19,
            "type": "order",
            "total": "35.30",
            "subtotal": "25.00",
            "discount": "0.00",
            "tax": "0.00",
            "taxes": [],
            "quantity": 1,
            "status": "archived",
            "payment_status": "approved",
            "fulfillment_status": "delivered",
            "token": "PVk3UW9ShDeA4CsziILUiOcJCfUuZRENGv3A",
            "device": "desktop",
            "note": null,
            "extra": {
                "utm": null,
                "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36",
                "customer_ip": "::1"
            },
            "canceled_at": null,
            "archived_at": null,
            "created_at": "2020-02-27 14:46:54",
            "updated_at": "2020-02-28 15:49:17",
            "customer": {
                "id": 2,
                "customer_group_id": 4,
                "external_id": null,
                "email": "eduardo@dooca.com.br",
                "cgc": "02716910001",
                "name": "Luke",
                "first_name": "Luke",
                "last_name": "Skywalker",
                "birthday": "1991-02-28",
                "gender": "male",
                "phone": "51992126348",
                "entity": "individual",
                "company": null,
                "ie": null,
                "newsletter": true,
                "marketplace": false,
                "note": null,
                "image": null,
                "token": "LDlx9CgtII6mhSAYxe4glFO3dTzbBq4BMSopjzhe9r7jKCKWg4D6H8bdRylOCRuNvHBod2c772a880c0167494874bf3c914",
                "facebook_id": null,
                "active": true,
                "created_at": "2020-01-30 18:23:07",
                "updated_at": "2020-01-30 18:23:07"
            },
            "address": {
                "id": 47,
                "order_id": 38,
                "name": null,
                "receiver": "Luke",
                "zipcode": "93540205",
                "street": "Rua Sapiranga",
                "number": "1231",
                "detail": null,
                "district": "Canudos",
                "city": "Novo Hamburgo",
                "state": "RS",
                "city_ibge_id": "4313409",
                "created_at": "2020-02-27 14:46:14",
                "updated_at": "2020-02-27 14:46:14"
            },
            "payment": {
                "id": 120,
                "order_id": 38,
                "payment_id": 2,
                "gateway_id": null,
                "name": "teste",
                "method": "manual",
                "description": null,
                "external": null,
                "status": "approved",
                "parcels": 1,
                "parcel_price": "35.30",
                "interest": "0.00",
                "discount": "0.00",
                "token": null,
                "card_brand": null,
                "card_bin": null,
                "card_end": null,
                "card_cgc": null,
                "card_owner": null,
                "card_expiry_date": null,
                "url": null,
                "nsu": null,
                "digitable_line": null,
                "processed_by": null,
                "processed_at": "2020-02-27 15:02:38",
                "expires_at": null,
                "created_at": "2020-02-27 14:46:50",
                "updated_at": "2020-02-27 15:02:38"
            },
            "discounts": [],
            "shipping": null,
            "items": [
                {
                    "id": 62,
                    "order_id": 38,
                    "variation_id": null,
                    "external_id": null,
                    "product_id": null,
                    "parent_id": null,
                    "name": "testepeso",
                    "reference": null,
                    "variation": null,
                    "options": null,
                    "image": null,
                    "price": "25.00",
                    "gtin": null,
                    "sku": null,
                    "mpn": null,
                    "ncm": null,
                    "price_compare": "26.00",
                    "quantity": 1,
                    "total": "25.00",
                    "note": null,
                    "checker": null,
                    "weight": "2.000",
                    "width": null,
                    "height": null,
                    "depth": null,
                    "kit": 0,
                    "grid": null,
                    "selling_out_of_stock": 0,
                    "billet_discount": null,
                    "discount": "0.00",
                    "additional_price": "0.00",
                    "customize": null,
                    "gift_wrapping": null,
                    "is_virtual": false,
                    "is_gift": false,
                    "created_at": "2020-02-27 14:45:04",
                    "updated_at": "2020-02-27 14:45:24",
                    "url": null,
                    "components": []
                }
            ],
            "has_shipping": false,
            "fulfillment": {
                "id": 11,
                "order_id": 38,
                "status": "delivered",
                "nfe_number": "311903075862610001845500100000we481404848162",
                "nfe_token": null,
                "nfe_series": "311903075862610001845500100we92481404848162",
                "shipping_code": null,
                "shipping_track_url": null,
                "shipping_track_description": null,
                "shipping_carrier_id": null,
                "shipping_carrier": null,
                "shipping_carrier_api": null,
                "nfe_created_at": "2020-02-27 15:03:15",
                "shipping_created_at": null,
                "created_at": "2020-02-27 15:02:42",
                "updated_at": "2020-02-28 15:49:17"
            },
            "marketplace": null,
            "histories": [
                {
                    "id": 100,
                    "order_id": 38,
                    "user_id": 7,
                    "status": "open",
                    "note": null,
                    "created_at": "2020-02-27 14:46:54"
                },
                {
                    "id": 101,
                    "order_id": 38,
                    "user_id": 7,
                    "status": "pending",
                    "note": null,
                    "created_at": "2020-02-27 14:46:54"
                },
                {
                    "id": 102,
                    "order_id": 38,
                    "user_id": 6,
                    "status": "approved",
                    "note": null,
                    "created_at": "2020-02-27 15:02:38"
                },
                {
                    "id": 103,
                    "order_id": 38,
                    "user_id": 6,
                    "status": "attended",
                    "note": null,
                    "created_at": "2020-02-27 15:02:42"
                },
                {
                    "id": 104,
                    "order_id": 38,
                    "user_id": 6,
                    "status": "invoiced",
                    "note": null,
                    "created_at": "2020-02-27 15:03:15"
                },
                {
                    "id": 112,
                    "order_id": 38,
                    "user_id": 6,
                    "status": "delivered",
                    "note": null,
                    "created_at": "2020-02-28 15:49:17"
                },
                {
                    "id": 113,
                    "order_id": 38,
                    "user_id": 6,
                    "status": "archived",
                    "note": null,
                    "created_at": "2020-02-28 15:49:17"
                }
            ]
          
       }

Listar Pedidos

GET https://api.dooca.store/orders

HTTP STATUS: 200 OK  
HTTP STATUS: 200 OK
{
            "id": 38,
            "external_id": null,
            "customer_id": 2,
            "code": 19,
            "type": "order",
            "total": "35.30",
            "subtotal": "25.00",
            "discount": "0.00",
            "tax": "0.00",
            "taxes": [],
            "quantity": 1,
            "status": "archived",
            "payment_status": "approved",
            "fulfillment_status": "delivered",
            "token": "PVk3UW9ShDeA4CsziILUiOcJCfUuZRENGv3A",
            "device": "desktop",
            "note": null,
            "extra": {
                "utm": null,
                "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36",
                "customer_ip": "::1"
            },
            "canceled_at": null,
            "archived_at": null,
            "created_at": "2020-02-27 14:46:54",
            "updated_at": "2020-02-28 15:49:17",
            "customer": {
                "id": 2,
                "customer_group_id": 4,
                "external_id": null,
                "email": "eduardo@dooca.com.br",
                "cgc": "02716910001",
                "name": "Luke",
                "first_name": "Luke",
                "last_name": "Skywalker",
                "birthday": "1991-02-28",
                "gender": "male",
                "phone": "51992126348",
                "entity": "individual",
                "company": null,
                "ie": null,
                "newsletter": true,
                "marketplace": false,
                "note": null,
                "image": null,
                "token": "LDlx9CgtII6mhSAYxe4glFO3dTzbBq4BMSopjzhe9r7jKCKWg4D6H8bdRylOCRuNvHBod2c772a880c0167494874bf3c914",
                "facebook_id": null,
                "active": true,
                "created_at": "2020-01-30 18:23:07",
                "updated_at": "2020-01-30 18:23:07"
            },
            "address": {
                "id": 47,
                "order_id": 38,
                "name": null,
                "receiver": "Luke",
                "zipcode": "93540205",
                "street": "Rua Sapiranga",
                "number": "1231",
                "detail": null,
                "district": "Canudos",
                "city": "Novo Hamburgo",
                "state": "RS",
                "city_ibge_id": "4313409",
                "created_at": "2020-02-27 14:46:14",
                "updated_at": "2020-02-27 14:46:14"
            },
            "payment": {
                "id": 120,
                "order_id": 38,
                "payment_id": 2,
                "gateway_id": null,
                "name": "teste",
                "method": "manual",
                "description": null,
                "external": null,
                "status": "approved",
                "parcels": 1,
                "parcel_price": "35.30",
                "interest": "0.00",
                "discount": "0.00",
                "token": null,
                "card_brand": null,
                "card_bin": null,
                "card_end": null,
                "card_cgc": null,
                "card_owner": null,
                "card_expiry_date": null,
                "url": null,
                "nsu": null,
                "digitable_line": null,
                "processed_by": null,
                "processed_at": "2020-02-27 15:02:38",
                "expires_at": null,
                "created_at": "2020-02-27 14:46:50",
                "updated_at": "2020-02-27 15:02:38"
            },
            "discounts": [],
            "shipping": null,
            "items": [
                {
                    "id": 62,
                    "order_id": 38,
                    "variation_id": null,
                    "external_id": null,
                    "product_id": null,
                    "parent_id": null,
                    "name": "testepeso",
                    "reference": null,
                    "variation": null,
                    "options": null,
                    "image": null,
                    "price": "25.00",
                    "gtin": null,
                    "sku": null,
                    "mpn": null,
                    "ncm": null,
                    "price_compare": "26.00",
                    "quantity": 1,
                    "total": "25.00",
                    "note": null,
                    "checker": null,
                    "weight": "2.000",
                    "width": null,
                    "height": null,
                    "depth": null,
                    "kit": 0,
                    "grid": null,
                    "selling_out_of_stock": 0,
                    "billet_discount": null,
                    "discount": "0.00",
                    "additional_price": "0.00",
                    "customize": null,
                    "gift_wrapping": null,
                    "is_virtual": false,
                    "is_gift": false,
                    "created_at": "2020-02-27 14:45:04",
                    "updated_at": "2020-02-27 14:45:24",
                    "url": null,
                    "components": []
                }
            ],
            "has_shipping": false,
            "fulfillment": {
                "id": 11,
                "order_id": 38,
                "status": "delivered",
                "nfe_number": "311903075862610001845500100000we481404848162",
                "nfe_token": null,
                "nfe_series": "311903075862610001845500100we92481404848162",
                "shipping_code": null,
                "shipping_track_url": null,
                "shipping_track_description": null,
                "shipping_carrier_id": null,
                "shipping_carrier": null,
                "shipping_carrier_api": null,
                "nfe_created_at": "2020-02-27 15:03:15",
                "shipping_created_at": null,
                "created_at": "2020-02-27 15:02:42",
                "updated_at": "2020-02-28 15:49:17"
            },
            "marketplace": null,
            "histories": [
                {
                    "id": 100,
                    "order_id": 38,
                    "user_id": 7,
                    "status": "open",
                    "note": null,
                    "created_at": "2020-02-27 14:46:54"
                },
                {
                    "id": 101,
                    "order_id": 38,
                    "user_id": 7,
                    "status": "pending",
                    "note": null,
                    "created_at": "2020-02-27 14:46:54"
                },
                {
                    "id": 102,
                    "order_id": 38,
                    "user_id": 6,
                    "status": "approved",
                    "note": null,
                    "created_at": "2020-02-27 15:02:38"
                },
                {
                    "id": 103,
                    "order_id": 38,
                    "user_id": 6,
                    "status": "attended",
                    "note": null,
                    "created_at": "2020-02-27 15:02:42"
                },
                {
                    "id": 104,
                    "order_id": 38,
                    "user_id": 6,
                    "status": "invoiced",
                    "note": null,
                    "created_at": "2020-02-27 15:03:15"
                },
                {
                    "id": 112,
                    "order_id": 38,
                    "user_id": 6,
                    "status": "delivered",
                    "note": null,
                    "created_at": "2020-02-28 15:49:17"
                },
                {
                    "id": 113,
                    "order_id": 38,
                    "user_id": 6,
                    "status": "archived",
                    "note": null,
                    "created_at": "2020-02-28 15:49:17"
                }
            ]
          
       }