Clientes

Tiago Assis
Tiago Assis
  • Atualizado

# Criar Cliente

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

 

Body
{
"first_name": "Suporte",
"last_name": "Dooca",
"cgc": "73535102006",
"email": "suporte@dooca.com.br",
"brithday": "1987-01-01",
"entity": "individual",
"#password": "123123",
"#address": {
"receiver": "Suporte Dooca",
"zipcode": " 93548192",
"street": "Rua Sapiranga",
"number": 90,
"detail": "Sala 203",
"district": "Jardim Mauá",
"city": "Novo Hamburgo",
"state": "RS"
}
}
Status: 201

 

# Atualizar um Cliente

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

Parâmetro: O ID Feature Group.

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

 

{
"customer_group_id": 1,
"name": "Generic New Name",
"cgc": "01072046067",
"email": "suporte@dooca.com.br"
}
Status: 200

 

# Deletar um Cliente

DELETE https://api.dooca.store/customers/:id

Parâmetro: O ID do cliente.

Response: 204

 

# Consultar Cliente

GET https://api.dooca.store/customers/:id

Parâmetro: O ID do cliente.

 

HTTP STATUS: 200 OK
{
"id": 163155,
"customer_group_id": 186,
"external_id": null,
"email": "suporte@dooca.com.br",
"cgc": "73535102006",
"name": "Suporte Dooca",
"first_name": "Suporte",
"last_name": "Dooca",
"birthday": null,
"gender": null,
"phone": null,
"entity": "individual",
"company": null,
"ie": null,
"newsletter": true,
"marketplace": false,
"note": null,
"image": null,
"token": "oGG7inmhaMIX1CYjv2MIVJodqze49lvODxhI9RDEhV7VPOc4H0CXGC585hParrL6rdrUf28fcf38f41ab407648774a0436f0373",
"facebook_id": null,
"active": true,
"created_at": "2020-01-10 09:39:23",
"updated_at": "2020-01-10 09:39:23",
"orders_count": 0,
"last_order_id": null,
"last_order_code": null,
"group": {
"id": 186,
"name": "Padrão",
"markup": "1.00000",
"min_purchase": "0.00",
"min_quantity": 1,
"is_default": true,
"created_at": "2020-01-08 15:00:26",
"updated_at": "2020-01-08 15:00:26"
},
"address": null
}

 

# Listar Clientes

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

 

HTTP STATUS: 200 OK
{
"id_customer": 1,
"external_id": null,
"id_customer_group": null,
"gender": "male",
"company": null,
"firstname": "Webmaster",
"lastname": "Dooca",
"name": "Webmaster Dooca",
"email": "webmaster@dooca.com.br",
"birthday": "2012-12-21",
"newsletter": "1",
"ip_registration": null,
"secure_key": "TA8321mCh9eIU1501uhe4Hcg2996847eI6TpWJBvsRD9tKw",
"active": "1",
"marketplace": "0",
"cgc": "11144477735",
"ie": "isento",
"phone": "5130976060",
"logged_at": "2018-09-05 01:02:13",
"created_at": "2018-04-27 14:44:29",
"updated_at": "2018-09-08 00:11:55",
"deleted_at": null,
"entity": "individual",
"note": null,
"image": null,
"pwd_updated_at": "2018-04-27 14:44:29",
"pwd_reset_token": null,
"facebook_id": null
}


# Deletar Cartão de Crédito do Cliente pelo ID

DELETE https://api.dooca.store/customers/:id/creditcards/:creditcard_id

Parâmetro: O ID do cliente e ID do cartão.

 

Response: 204

 

# Consultar Pedidos do Cliente pelo ID

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

Parâmetro: O ID do cliente.

 

# Consultar Cliente pelo Email

GET https://api.dooca.store/customers/email/:email

Parâmetro: O email do cliente.

 

# Consultar Cliente pelo Token

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

Parâmetro: O Token do cliente.

 

# Consultar Cliente pelo ID do Facebook

GET https://api.dooca.store/customers/facebook/:fbid

Parâmetro: O ID do Facebook do cliente.

 

# Consultar Cliente pelo CGC

GET https://api.dooca.store/customers/cgc/:cgc

Parâmetro: O CGC do cliente.

 

# Consultar Review do Cliente pelo ID

GET https://api.dooca.store/customers/:id/review

Parâmetro: O ID do cliente.

 

HTTP STATUS: 200 OK
{
"order_total": null,
"order_count": 0,
"avg_ticket": 0,
"avg_items": 0,
"last_order_created_at": "",
"ranking": 1,
"ranking_count": 1,
"purchased_items": [],
"cart_items": []
}

 

# Criar Login para Cliente

POST https://api.dooca.store/customers/login

 

{
"email": "suporte@dooca.com.br",
"password": "123123"
}

Esse artigo foi útil?

Usuários que acharam isso útil: 0 de 0

Tem mais dúvidas? Envie uma solicitação

Comentários

0 comentário

Por favor, entre para comentar.