Customer
A query customer retorna informações sobre clientes/usuários vinculados à uma loja.
Além dos dados básicos é possível retornar, também, dados sobre os endereços domiciliar e de entrega vinculados ao cliente.
Requisição
Parâmetros
Parâmetro | Tipo | Obrigatório | Descrição |
---|---|---|---|
customerAccessToken | String | Sim | Token do cliente. Deve estar válido |
Para criação e renovação de um customerAccessToken podem ser consultadas as respectivas mutations
Campos
Campo | Descrição |
---|---|
birthDate | Data de nascimento do cliente |
businessPhoneNumber | Telefone comercial |
cnpj | CNPJ, em caso de empresa |
companyName | Razão social da empresa |
cpf | CPF do cliente, em caso de pessoa física |
creationDate | Data de cadastro do cliente |
customerId | ID de cadastro do cliente |
customerName | Nome do cliente |
customerType | Tipo de cliente (físico ou jurídico) |
deliveryAddress | Endereço de entrega |
Email do cliente | |
gender | Gênero do cliente |
mobilePhoneNumber | Telefone celular |
orders | Pedidos realizados pelo cliente |
orderStatistics | Estatística de pedidos feitos pelo cliente |
partners | Parceiros aos quais o cliente está associado |
phoneNumber | Telefone residencial |
residentialAddress | Endereço residencial do cliente |
responsibleName | Nome do responsável, em caso de empresa |
rg | RG do cliente |
stateRegistration | Inscrição estadual, em caso de empresa |
updateDate | Data da última atualização |
wishlist | Produtos na lista de desejos do cliente |
Exemplo 1
Neste exemplo são pedidas informações do cliente, parceiros associados e endereços residencial e de entrega:
query($customerAccessToken:String) {
customer(customerAccessToken:$customerAccessToken) {
customerName
customerType
companyName
partners {
name
partnerAccessToken
}
deliveryAddress {
street
addressDetails
addressNumber
neighborhood
city
referencePoint
state
country
}
residencialAddress {
street
addressDetails
addressNumber
neighborhood
city
referencePoint
state
country
}
}
}
Mostrar resposta do request
{
"data": {
"customer": {
"customerName": "Nome Fictício",
"customerType": "Física",
"companyName": "",
"partners": [
{
"name": "Parceiro por Cliente",
"partnerAccessToken": "abc123"
}
],
"deliveryAddress": {
"street": "Rua Fictícia",
"addressDetails": "fbits",
"addressNumber": "280",
"neighborhood": "Bairro Fictício",
"city": "Curitiba",
"referencePoint": "12345",
"state": "PR",
"country": "BRASIL"
},
"residencialAddress": {
"street": "Rua Fictícia 2",
"addressDetails": "fbits",
"addressNumber": "2120",
"neighborhood": "Bairro Fictício 2",
"city": "Curitiba",
"referencePoint": "12345",
"state": "PR",
"country": "BRASIL"
}
}
}
}
Exemplo 2
Dentro da query customer é possível retornar o campo wishlist que contém uma lista de products que compõem a lista de desejos do cliente. Um recurso presente na query é a possibilidade de filtrar os produtos que irão retornar na listagem através do argumento productsIds. Caso não sejam informados produtos dentro desse array ou ele seja nulo, todos os produtos da lista serão retornados.
query Wishlist($customerAccessToken: String!, $productsIds: [Long]){
customer(customerAccessToken: $customerAccessToken){
wishlist(productsIds: $productsIds){
products{
id
productId
productName
productVariantId
alias
images {
url
print
fileName
}
available
prices {
listPrice
price
installmentPlans{
displayName
name
installments{
discount
fees
number
value
}
}
bestInstallment {
name
displayName
discount
fees
number
value
}
}
promotions{
content
id
stamp
title
}
addToCartFromSpot
}
}
}
}
Mostrar resposta do request
{
"data": {
"customer": {
"wishlist": {
"products": [
{
"id": "eyJFbnRpdHkiOiJQcm9kdWN0IiwiSWQiOjQxMX0=",
"productId": 234,
"productName": "CAPITOLLIUM EXCLUSIVE - VESTIDO MALHA RECORTES MANGA LONGA - PÚRPURA",
"productVariantId": 411,
"alias": "capitollium-exclusive-vestido-malha-recortes-manga-longa-purpura-234",
"images": [
{
"url": "https://lojacss.fbitsstatic.net/img/p/capitollium-exclusive-vestido-malha-recortes-manga-longa-purpura-234/411.jpg?w=800&h=800&v=no-value",
"print": false,
"fileName": "411"
},
{
"url": "https://lojacss.fbitsstatic.net/img/p/capitollium-exclusive-vestido-malha-recortes-manga-longa-purpura-234/411-1.jpg?w=800&h=800&v=no-value",
"print": false,
"fileName": "411-1"
}
],
"available": true,
"prices": {
"listPrice": 5640,
"price": 4590,
"installmentPlans": [
{
"displayName": "Teste Pix",
"name": "Vindi - Pix",
"installments": [
{
"discount": false,
"fees": true,
"number": 1,
"value": 4681.8
}
]
},
{
"displayName": "Cartão Sem Desconto",
"name": "Vindi - Cartão",
"installments": [
{
"discount": false,
"fees": true,
"number": 1,
"value": 5049
},
{
"discount": false,
"fees": false,
"number": 2,
"value": 2295
},
{
"discount": false,
"fees": false,
"number": 3,
"value": 1530
},
{
"discount": false,
"fees": false,
"number": 4,
"value": 1147.5
},
{
"discount": false,
"fees": false,
"number": 5,
"value": 918
},
{
"discount": false,
"fees": true,
"number": 6,
"value": 784.12
},
{
"discount": false,
"fees": true,
"number": 7,
"value": 672.11
},
{
"discount": false,
"fees": true,
"number": 8,
"value": 588.09
},
{
"discount": false,
"fees": true,
"number": 9,
"value": 522.75
},
{
"discount": false,
"fees": true,
"number": 10,
"value": 470.48
},
{
"discount": false,
"fees": true,
"number": 11,
"value": 427.7
},
{
"discount": false,
"fees": true,
"number": 12,
"value": 392.06
}
]
}
],
"bestInstallment": {
"name": "Vindi - Cartão",
"displayName": "Cartão Sem Desconto",
"discount": false,
"fees": false,
"number": 5,
"value": 918
}
},
"promotions": [],
"addToCartFromSpot": false
}
]
}
}
}
}
Pedidos realizados por um Usuário
Dentro da query customer é possível retornar o campo orders que contém os pedidos realizados pelo cliente, podendo consultar pelo número do pedido, status, produtos entre outros campos.
query($customerAccessToken:String) {
customer(customerAccessToken:$customerAccessToken) {
customerName
id
orders {
items {
date
orderId
products {
sku
name
attributes {
name
value
}
quantity
unitaryValue
price
}
status {
status
statusId
}
subtotal
total
}
page
totalCount
}
}
}
Mostrar resposta do request
{
"data": {
"customer": {
"customerName": "Teste",
"id": "1234567800000000JDdXN0b21lciIsIklkIjozMDQ5Mjh9",
"orders": {
"items": [
{
"date": "2023-07-12T15:59:28.000-03:00",
"orderId": 123456,
"products": [
{
"sku": "5002",
"name": "Chocolate ao Leite 32g c/30",
"attributes": [],
"quantity": 1,
"unitaryValue": 0,
"price": 150
}
],
"status": {
"status": "Pedido Cancelado",
"statusId": 0
},
"subtotal": 0,
"total": 204.72
},
{
"date": "2023-07-07T09:00:28.000-03:00",
"orderId": 987654,
"products": [
{
"sku": "163016",
"name": "CANETA",
"attributes": [
{
"name": "COR",
"value": "Única"
},
{
"name": "Tamanho",
"value": "Único"
}
],
"quantity": 1,
"unitaryValue": 15.42,
"price": 3
}
],
"status": {
"status": "Pedido Cancelado",
"statusId": 0
},
"subtotal": 15.42,
"total": 21.42
},
{
"date": "2023-07-06T09:01:03.000-03:00",
"orderId": 012376,
"products": [
{
"sku": "163016",
"name": "CANETA",
"attributes": [
{
"name": "COR",
"value": "Única"
},
{
"name": "Tamanho",
"value": "Único"
}
],
"quantity": 2,
"unitaryValue": 4.9,
"price": 3
}
],
"status": {
"status": "Pedido Cancelado",
"statusId": 0
},
"subtotal": 9.8,
"total": 19.8
},
{
"date": "2023-07-06T09:00:48.000-03:00",
"orderId": 123098,
"products": [
{
"sku": "163016",
"name": "CANETA",
"attributes": [
{
"name": "COR",
"value": "Única"
},
{
"name": "Tamanho",
"value": "Único"
}
],
"quantity": 1,
"unitaryValue": 10.02,
"price": 3
}
],
"status": {
"status": "Pedido Cancelado",
"statusId": 0
},
"subtotal": 10.02,
"total": 16.02
},
{
"date": "2023-05-13T09:00:36.000-03:00",
"orderId": 342145,
"products": [
{
"sku": "163016",
"name": "CANETA",
"attributes": [
{
"name": "COR",
"value": "Única"
},
{
"name": "Tamanho",
"value": "Único"
}
],
"quantity": 2,
"unitaryValue": 10.5,
"price": 3
}
],
"status": {
"status": "Pedido Cancelado",
"statusId": 0
},
"subtotal": 21,
"total": 31
},
{
"date": "2023-05-13T09:00:28.000-03:00",
"orderId": 342108,
"products": [
{
"sku": "163016",
"name": "CANETA",
"attributes": [
{
"name": "COR",
"value": "Única"
},
{
"name": "Tamanho",
"value": "Único"
}
],
"quantity": 1,
"unitaryValue": 12.98,
"price": 3
}
],
"status": {
"status": "Pedido Cancelado",
"statusId": 0
},
"subtotal": 12.98,
"total": 18.98
},
{
"date": "2023-04-13T17:57:13.000-03:00",
"orderId": 339888,
"products": [
{
"sku": "163016",
"name": "CANETA",
"attributes": [
{
"name": "COR",
"value": "Única"
},
{
"name": "Tamanho",
"value": "Único"
}
],
"quantity": 1,
"unitaryValue": 12.98,
"price": 3
}
],
"status": {
"status": "Pedido Cancelado",
"statusId": 0
},
"subtotal": 12.98,
"total": 18.98
},
{
"date": "2023-04-13T10:04:20.000-03:00",
"orderId": 339778,
"products": [
{
"sku": "163016",
"name": "CANETA",
"attributes": [
{
"name": "COR",
"value": "Única"
},
{
"name": "Tamanho",
"value": "Único"
}
],
"quantity": 1,
"unitaryValue": 12.98,
"price": 3
}
],
"status": {
"status": "Pedido Cancelado",
"statusId": 0
},
"subtotal": 12.98,
"total": 18.98
},
{
"date": "2023-04-07T09:00:23.000-03:00",
"orderId": 339667,
"products": [
{
"sku": "163016",
"name": "CANETA",
"attributes": [
{
"name": "COR",
"value": "Única"
},
{
"name": "Tamanho",
"value": "Único"
}
],
"quantity": 1,
"unitaryValue": 12.98,
"price": 3
}
],
"status": {
"status": "Pedido Cancelado",
"statusId": 0
},
"subtotal": 12.98,
"total": 18.98
},
{
"date": "2023-03-31T09:09:25.000-03:00",
"orderId": 1139239,
"products": [
{
"sku": "16631.533.U",
"name": "Bola Adidas",
"attributes": [],
"quantity": 1,
"unitaryValue": 209.9,
"price": 209.9
}
],
"status": {
"status": "Pedido Cancelado",
"statusId": 0
},
"subtotal": 209.9,
"total": 236.94
}
],
"page": 1,
"totalCount": 1835
}
}
}
}
Informações de pagamentos nos pedidos
Segue abaixo um exemplo com as informações de pagamento no pedido:
query($customerAccessToken:String){
customer(customerAccessToken:$customerAccessToken){
customerName
id
orders{
items{
date
orderId
payments{
card{
brand
maskedNumber
}
boleto{
digitableLine
paymentLink
}
pix{
qrCode
qrCodeExpirationDate
qrCodeUrl
}
}
products{
sku
name
attributes{
name
value
}
quantity
unitaryValue
price
}
status{
status
statusId
}
subtotal
total
}
page
totalCount
}
}
}
Mostrar resposta do request
{
"data": {
"customer": {
"customerName": "Teste",
"id": "eyJFbnRpdHkiOiJDdXN0b21lciIsIklkIjozMDQ00000",
"orders": {
"items": [
{
"date": "2023-08-23T09:00:28.000-03:00",
"orderId": 349647,
"payments": [
{
"card": null,
"boleto": {
"digitableLine": "12345.123456 12345.123565 12345.123456 2 12340000001234",
"paymentLink": "https://intermediador-teste.teste.com.br/orders/billet/b3d3935ad1bf7b350b5f2838df500002"
},
"pix": null
}
],
"products": [
{
"sku": "163016",
"name": "CANETA",
"attributes": [
{
"name": "COR",
"value": "Única"
},
{
"name": "Tamanho",
"value": "Único"
}
],
"quantity": 2,
"unitaryValue": 42.755,
"price": 3
}
],
"status": {
"status": "Pedido Cancelado",
"statusId": 0
},
"subtotal": 85.51,
"total": 95.52
},
{
"date": "2023-08-18T09:00:31.000-03:00",
"orderId": 349449,
"payments": [
{
"card": null,
"boleto": {
"digitableLine": "12345.123456 12345.123565 12345.123456 2 12340000001234",
"paymentLink": "https://intermediador-teste.teste.com.br/orders/billet/b3d3935ad1bf7b350b5f2838df500002"
},
"pix": null
}
],
"products": [
{
"sku": "163016",
"name": "CANETA",
"attributes": [
{
"name": "COR",
"value": "Única"
},
{
"name": "Tamanho",
"value": "Único"
}
],
"quantity": 1,
"unitaryValue": 48.98,
"price": 3
}
],
"status": {
"status": "Pedido Cancelado",
"statusId": 0
},
"subtotal": 48.98,
"total": 54.98
},
{
"date": "2023-08-11T09:01:14.000-03:00",
"orderId": 348809,
"payments": [
{
"card": null,
"boleto": {
"digitableLine": "12345.123456 12345.123565 12345.123456 2 12340000001234",
"paymentLink": "https://intermediador-teste.teste.com.br/orders/billet/b3d3935ad1bf7b350b5f2838df500002"
},
"pix": null
}
],
"products": [
{
"sku": "marvel",
"name": "Roupeiro GRP2.4",
"attributes": [],
"quantity": 1,
"unitaryValue": 12851.49,
"price": 983.99
}
],
"status": {
"status": "Pedido Cancelado",
"statusId": 0
},
"subtotal": 12851.49,
"total": 11574.82
},
{
"date": "2023-08-11T09:00:46.000-03:00",
"orderId": 348783,
"payments": [
{
"card": null,
"boleto": {
"digitableLine": "12345.123456 12345.123565 12345.123456 2 12340000001234",
"paymentLink": "https://intermediador-teste.teste.com.br/orders/billet/b3d3935ad1bf7b350b5f2838df500002"
},
"pix": null
}
],
"products": [
{
"sku": "163016",
"name": "CANETA",
"attributes": [
{
"name": "COR",
"value": "Única"
},
{
"name": "Tamanho",
"value": "Único"
}
],
"quantity": 2,
"unitaryValue": 46.5,
"price": 3
}
],
"status": {
"status": "Pedido Cancelado",
"statusId": 0
},
"subtotal": 93,
"total": 103.01
},
{
"date": "2023-08-11T09:00:33.000-03:00",
"orderId": 348736,
"payments": [
{
"card": null,
"boleto": {
"digitableLine": "12345.123456 12345.123565 12345.123456 2 12340000001234",
"paymentLink": "https://intermediador-teste.teste.com.br/orders/billet/b3d3935ad1bf7b350b5f2838df500002"
},
"pix": null
}
],
"products": [
{
"sku": "163016",
"name": "CANETA",
"attributes": [
{
"name": "COR",
"value": "Única"
},
{
"name": "Tamanho",
"value": "Único"
}
],
"quantity": 1,
"unitaryValue": 48.98,
"price": 3
}
],
"status": {
"status": "Pedido Cancelado",
"statusId": 0
},
"subtotal": 48.98,
"total": 54.98
},
{
"date": "2023-07-12T15:59:28.000-03:00",
"orderId": 346479,
"payments": [
{
"card": null,
"boleto": {
"digitableLine": "12345.123456 12345.123565 12345.123456 2 12340000001234",
"paymentLink": "https://intermediador-teste.teste.com.br/orders/billet/b3d3935ad1bf7b350b5f2838df500002"
},
"pix": null
}
],
"products": [
{
"sku": "cho5002",
"name": "Chocolate Chokito",
"attributes": [],
"quantity": 1,
"unitaryValue": 0,
"price": 150
}
],
"status": {
"status": "Pedido Cancelado",
"statusId": 0
},
"subtotal": 0,
"total": 204.72
},
{
"date": "2023-07-07T09:00:28.000-03:00",
"orderId": 346295,
"payments": [
{
"card": null,
"boleto": {
"digitableLine": "12345.123456 12345.123565 12345.123456 2 12340000001234",
"paymentLink": "https://intermediador-teste.teste.com.br/orders/billet/b3d3935ad1bf7b350b5f2838df500002"
},
"pix": null
}
],
"products": [
{
"sku": "163016",
"name": "CANETA",
"attributes": [
{
"name": "COR",
"value": "Única"
},
{
"name": "Tamanho",
"value": "Único"
}
],
"quantity": 1,
"unitaryValue": 15.42,
"price": 3
}
],
"status": {
"status": "Pedido Cancelado",
"statusId": 0
},
"subtotal": 15.42,
"total": 21.42
},
{
"date": "2023-07-06T09:01:03.000-03:00",
"orderId": 346184,
"payments": [
{
"card": null,
"boleto": {
"digitableLine": "12345.123456 12345.123565 12345.123456 2 12340000001234",
"paymentLink": "https://intermediador-teste.teste.com.br/orders/billet/b3d3935ad1bf7b350b5f2838df500002"
},
"pix": null
}
],
"products": [
{
"sku": "163016",
"name": "CANETA",
"attributes": [
{
"name": "COR",
"value": "Única"
},
{
"name": "Tamanho",
"value": "Único"
}
],
"quantity": 2,
"unitaryValue": 4.9,
"price": 3
}
],
"status": {
"status": "Pedido Cancelado",
"statusId": 0
},
"subtotal": 9.8,
"total": 19.8
},
{
"date": "2023-07-06T09:00:48.000-03:00",
"orderId": 346180,
"payments": [
{
"card": null,
"boleto": {
"digitableLine": "12345.123456 12345.123565 12345.123456 2 12340000001234",
"paymentLink": "https://intermediador-teste.teste.com.br/orders/billet/b3d3935ad1bf7b350b5f2838df500002"
},
"pix": null
}
],
"products": [
{
"sku": "163016",
"name": "CANETA",
"attributes": [
{
"name": "COR",
"value": "Única"
},
{
"name": "Tamanho",
"value": "Único"
}
],
"quantity": 1,
"unitaryValue": 10.02,
"price": 3
}
],
"status": {
"status": "Pedido Cancelado",
"statusId": 0
},
"subtotal": 10.02,
"total": 16.02
},
{
"date": "2023-05-13T09:00:36.000-03:00",
"orderId": 342145,
"payments": [
{
"card": null,
"boleto": {
"digitableLine": "123123123123123131232131232131313211231321321",
"paymentLink": "https://intermediador-teste.teste.com.br/orders/billet/b3d3935ad1bf7b350b5f2838df500002"
},
"pix": null
}
],
"products": [
{
"sku": "163016",
"name": "CANETA",
"attributes": [
{
"name": "COR",
"value": "Única"
},
{
"name": "Tamanho",
"value": "Único"
}
],
"quantity": 2,
"unitaryValue": 10.5,
"price": 3
}
],
"status": {
"status": "Pedido Cancelado",
"statusId": 0
},
"subtotal": 21,
"total": 31
}
],
"page": 1,
"totalCount": 1932
}
}
}
}
Informações de assinaturas de um pedido de um usuário
Segue abaixo um exemplo com as informações de assinaturas de um usuário:
query {
customer(customerAccessToken:$customerAccessToken) {
orders {
items {
subscriptions {
subscriptionsGroupId
subscriptionsOrderId
value
typePeriod
timePeriod
}
}
}
}
}
Mostrar resposta do request
{
"data":{
"customer":{
"orders":{
"items":[
{
"subscriptions":[
{
"subscriptionsGroupId":558,
"subscriptionsOrderId":3790260,
"value":230.00,
"typePeriod":"Semanal",
"timePeriod":7
}
]
}
]
}
}
}
}
Consultando o saldo da conta corrente do usuário
Segue abaixo um exemplo da consulta do saldo de conta corrente de um usuário:
query {
customer(
customerAccessToken: "bZeXpxVBFdzRsYRZ9+2xNGTfJ300G3oE7Hp5w9wEnJWkwN9r9mF7E236KpS49j0qcEJtj/Op5SxMIpFQj9EPz/HBPVDnJqIRuc1qftOl+fz/qlCSpaQDm2ayvGMOROga9uKP64kBa5RT/3VqWmHdmhGR11nhhtPsVpIPfByIOLUgHJYdAOuWVBrL7rOirrFSNisgdKgSWv8LnDW2JbXrda2Y6NOmegZm3e4xx+g4mixU9ZREL9gjJu9pr6/4lsc3"
) {
checkingAccountBalance
}
}
Mostrar resposta do request
{
"data": {
"customer": {
"checkingAccountBalance": 100
}
}
}
Consultando histórico da conta corrente do usuário
Segue abaixo um exemplo da consulta do histórico de conta corrente de um usuário:
query {
customer(
customerAccessToken: "N6+ct/y+Z/4Rt5+OLEh8t73xvIHJ9o+gc1W7SQRDVwcSXMcbyJyMQy/NDT20AIRao0QPsNlLK55xSulsLSRpCJtAq683gH/4kugl7Gz8y7Nm48CstuqnVExArBoCn8lCP2ytML3Og0Uvj3IfvkuGytnq2JXOBvkkNZGYpOeZuIJoWAtgTHXkr9FIRFKY0DeSj+UyAVZ4MO0OMAUB5Yhu8z/Q4of62Eeu7Jj5sqh/fdJajAX4lmtDc3SzptNwBEoF"
) {
checkingAccountBalance
checkingAccountHistory {
date
historic
type
value
}
}
}
Mostrar resposta do request
{
"data": {
"customer": {
"checkingAccountBalance": 100,
"checkingAccountHistory": [
{
"date": "2024-01-12T11:17:55.832-03:00",
"historic": "Lançamento realizado pelo usuario teste.teste via Admin.",
"type": "Credit",
"value": 100
}
]
}
}
}
Consultando endereço e pedido específico de um usuário
Segue abaixo um exemplo da consulta de um endereço e de um pedido específico de um usuário:
query {
customer(
customerAccessToken: "8AC/HuyO7EOV+DoK1wCks5BVb++CPQW2NaESa1AVWeCQ3tZ4FBrFHm12xfOCDdwmLRHJS+YYBRJqTEPvmRVYy5SjQyUVlDqAjGdwNrW09a8NJyb6jkOgbvWuvRd4JlsOtTS95D0aoKRBFTp6IB7Wu3o03tdYp37r6l+qgpLbu3ycE7RG1UmXjNnA+Uecyq8q1pYbPU84tUFd2vTY9h/Kn32YQIH5shB6OCIW12nMtG4PbUj7BlfV8e6W0uUYIYazlxo/Tmnvng5G5TW9pQSM51Q=="
) {
customerName
address(
addressId: "eyAJFbnRpdHkiOiJDdXN0b21lckFkZHJlc3MiLCJJZCI6NTY4MDU4fQ=="
) {
id
name
referencePoint
street
neighborhood
city
}
order(orderId: 471797) {
orderId
total
products {
productVariantId
price
}
}
}
}
Mostrar resposta do request
{
"data": {
"customer": {
"customerName": "Teste",
"address": {
"id": "eyJFbnRpdHkiOiJDdXN0b21lckFkZHJlc3MiLCJJZCI6NTY4MDU4fQ==",
"name": "Teste",
"referencePoint": "portao cinza",
"street": "Rua Conselheiro Dantas",
"neighborhood": "Centro",
"city": "Curitiba"
},
"order": {
"orderId": 471797,
"total": 8026.33,
"products": [
{
"productVariantId": 64,
"price": 6897
}
]
}
}
}
}
Retornando informações de assinatura de um usuário
Segue abaixo, um exemplo de uma consulta que retorna as assinaturas de um usuário, apresentando também os status das mesmas:
query {
customer (customerAccessToken: $customerAccessToken){
email
subscriptions {
cancellationDate
coupon
date
intercalatedRecurrenceDate
nextRecurrenceDate
pauseDate
status
subscriptionGroupId
products {
productVariantId
quantity
removed
value
}
recurring {
days
description
name
recurringId
removed
}
payment {
type
card {
expiration
brand
number
}
}
}
}
}
Mostrar resposta do request
{
"data": {
"customer": {
"email": "[email protected]",
"subscriptions": [
{
"cancellationDate": null,
"coupon": "",
"date": "2022-03-10T16:26:46.437-03:00",
"intercalatedRecurrenceDate": null,
"nextRecurrenceDate": "2023-09-14T09:56:19.257-03:00",
"pauseDate": null,
"status": "Ativo",
"subscriptionGroupId": 313,
"products": [
{
"productVariantId": 256567,
"quantity": 1,
"removed": false,
"value": 1000
}
],
"recurring": {
"days": 7,
"description": "",
"name": "Semanal",
"recurringId": 868,
"removed": false
},
"payment": {
"type": "Cartão",
"card": {
"expiration": "07/2032",
"brand": "mastercard",
"number": "9101"
}
}
}
]
}
}
}
Retornando informações relacionadas ao parceiro por cliente
Segue abaixo, um exemplo de uma consulta que retorna as informações relacionadas ao parceiro por cliente:
query {
customer(customerAccessToken: "pppppplll+u/lYS4+z77LHG7R5pLniTqoMeYBCAnG+4pzNndiaCQAXxl/jPwxfgXVn05UEUzn0OIV/g3EkpZd7+yV3ov27YAZmjAsfqmVliv14J/GN4WHmrbTxdhFQUrNcb7smNz0bR0eCd8Vfyc9WlvgDHDGtw8il4fRarU9IOHf3XO+MlowdSZRAZYJnupraZgmItobqN9B5lD/Tr6jAdXW4/HAyt+yny+UAZSeDjYYkfiZgEZUBQVEwlXYvp"
) {
partners {
alias
name
partnerAccessToken
endDate
logoUrl
fullUrlLogo
id
origin
partnerId
portfolioId
priceTableId
}
}
}
Mostrar resposta do request
{
"data": {
"customer": {
"partners": [
{
"alias": "power",
"name": "Power",
"partnerAccessToken": "sf_0yuxCeIFXDuE1Utfp/vUp/0DB6U/BweLqf/8iREt8Zu9qgaMwRUKLz0pDrEL28FuRntVq/CYfnXmE1m3w88nTRXoFD9YGKwRWXLGdESQ9lfCSJ0nDtUA53EQDTZhPoJS/dopRl5VyaxefPBVI3bXwmd74BIyHqUjF4HDn7EAA5s=",
"endDate": "2022-07-29T15:53:00.000-03:00",
"logoUrl": null,
"fullUrlLogo": null,
"id": "eyJFbnRpdHkiOiJQYXJ0bmVyIiwiSWQiOjk5fQ==",
"origin": null,
"partnerId": 99,
"portfolioId": 0,
"priceTableId": 110
},
{
"alias": "parceirocliente",
"name": "Parceiro por Cliente",
"partnerAccessToken": "sf_AmYF6HTsSNbZ/qP6TJVj6F1/cWW7nfZC/7gqAksfFU3X0vyFvZIhZJvgeLfrBerKWx31ouW9kAJkXOvzoPtH72tLTJKI6OMfrfowwCtPDEL1r/EVzBH7FF4ZjKzHO0Gj1P4xOsDZc8pVHYTqVWWyyTGiUoFQF+In6tgC+4qpRUU=",
"endDate": "2036-06-03T16:26:00.000-03:00",
"logoUrl": "fd5fe85c-89ee-4699-bb68-c9dd1cd33d60.jpg",
"fullUrlLogo": "https://sualoja.fbitsstatic.net/img/lp/fd5fe85c-89ee-4699-bb68-c9dd1cd33d60.jpg?v=no-value",
"id": "eyJFbnRpdHkiOiJQYXJ0bmVyIiwiSWQiOjgxfQ==",
"origin": null,
"partnerId": 81,
"portfolioId": 0,
"priceTableId": 87
}
]
}
}
}
Updated 26 days ago