Como utilizar a SandBox para testar a minha integração?
Abaixo temos acesso a alguns métodos implementados para interagir com a "sandbox" de testes:
INTRODUÇÃO:
Aqui temos algumas implementações de integração direta com a loja aqui utilizada como "sandbox", e neste espaço, realizar testes, ou ainda, simular compras para testar alguma lista de retorno por consulta como as vendas de um determinado dia por exemplo, etc
TIPOS DE RETORNO: JSON/Único, JSON/Matriz e CSV
1 - AUTENTICAÇÃO
- EXIBIR CHAVE DO USUÁRIO APIUSer
Chave APIUser: EXIBIR CHAVE
- VALIDAR CHAVE
HASH: 1d87c5c60bd9e489ec710a0db20ca46b - VERIFICAR CHAVE
2 - INTERAÇÃO COM PRODUTOS
- ALTERAR O PREÇO DO PRODUTO: 7895800169230 / HALLS 27G CEREJA PARA R$ 5.00 (cinco reais) e a quantidade para 100
AÇÃO: ALTERAR PRODUTO
- ALTERAR O PREÇO DO PRODUTO: 7895800169230 / HALLS 27G CEREJA PARA R$ 1.25 (um real e vinte e cinco centavos) e a quantidade para 50
AÇÃO: ALTERAR PRODUTO
- ZERAR A QUANTIDADE DO PRODUTO : 7895800169230 / HALLS 27G CEREJA (esta ação desativará o produto) e o preço para R$ 1.25 (um real e vinte e cinco centavos)
AÇÃO: ALTERAR PRODUTO
- REATIVAR PRODUTO: 7895800169230 / HALLS 27G CEREJA PARA R$ 1.25 (um real e vinte e cinco centavos) e a quantidade para 200
AÇÃO: ALTERAR PRODUTO
3 - LISTAS E RELAÇÕES
- LISTAR TODOS OS PRODUTOS CADASTRADOS :
AÇÃO: LISTAR TODOS PRODUTOS
RETORNO EM JSON: {"seq_1":1, "product_id_1":"1", "ean_1":"7891109789841", "name_1":"SAND HAV COLOR AZUL NAVAL 41\/42 PAR", "quantity_1":"9", "image_1":"catalog\/produtos\/sand_hav_color\/7891109789841.jpg", "price_1":"12.5000", "points_1":"0", "weight_1":"0.00000000", "status_1":"1", "viewed_1":"0", "total":1}
OBS: Dependendo da quantidade de produtos cadastrados, utilize outros métodos de consulta. Para proporcionar o máximo de compatibilidade com as mais diversas linguagens de programação o JSON de retorno informa o total de registros transportados para o controle da aplicação final, podendo a mesma realizar a leitura sequencial das chaves> seq_X,product_id_X,ean_X,name_X,quantity_X,image_X,price_X,points_X,weight_X,status_X,viewed_X, sendo X a sequencia a ser lida pela aplicação do cliente.
- LISTAR TODAS AS CATEGORIAS :
AÇÃO: LISTAR TODAS AS CATEGORIAS
RETORNO EM JSON: {"seq_1":1, "parent_id_1":"0", "name_1":"sub grupo teste", "category_id_1":"1", "category_1":"", "top_1":"0", "status_1":"1", "total":1}
OBS: Para proporcionar o máximo de compatibilidade com as mais diversas linguagens de programação o JSON de retorno informa o total de registros transportados para o controle da aplicação final, podendo a mesma realizar a leitura sequencial das chaves> seq_X,parent_id_X,name_X,category_id_X,category_X,top_X,status_X, sendo X a sequencia a ser lida pela aplicação do cliente.
- LISTAR TODOS OS PRODUTOS DESATIVADOS :
AÇÃO: LISTAR TODOS OS PRODUTOS DESATIVADOS
RETORNO EM JSON: {"seq_1":1, "parent_id_1":"0", "name_1":"sub grupo teste", "category_id_1":"1", "category_1":"", "top_1":"0", "status_1":"1", "total":1}
OBS: Para proporcionar o máximo de compatibilidade com as mais diversas linguagens de programação o JSON de retorno informa o total de registros transportados para o controle da aplicação final, podendo a mesma realizar a leitura sequencial das chaves> seq_X,parent_id_X,name_X,category_id_X,category_X,top_X,status_X, sendo X a sequencia a ser lida pela aplicação do cliente.
- LISTAR TODOS OS STATUS DAS VENDAS:
AÇÃO: LISTAR TODOS OS STATUS CADASTRADOS PARA AS VENDAS
RETORNO EM JSON: {"seq_1":1,"order_status_id_1":"2","name_1":"Processando...", "total": 1}
OBS: Obedece a mesma lógica de retorno dos itens anteriores.
- LISTAR VENDAS DE UMA DETERMINADA DATA ( 11-05-2020 ) :
AÇÃO: LISTAR TODAS AS VENDAS DE 11-05-2020
RETORNO EM JSON: ( a descrever )
OBS: Obedece a mesma lógica de retorno dos itens anteriores.
- LISTAR TODOS OS PRODUTOS CADASTRADOS SEM IMAGEM DE CAPA:
AÇÃO: LISTAR TODOS PRODUTOS SEM IMAGEM DE CAPA
RETORNO FORMATO CSV: ( a descrever ) - pode ser lido por stream
OBS: Retorno em formato CSV
4 - SIMULAR VENDAS PARA CONSULTA POSTERIOR
- PARA FINS DE TESTES PODEMOS UTILIZAR OS SEGUINTES DADOS PARA REALIZAR LOGIN E REALIZAR ALGUM TESTE DE VENDA NA SANDBOX:
LOGIN: demo@bigdataecommerce.com.br
SENHA: demo123
OBS: Ao realizar alguma compra você poderá realizar a API para consultar a transação.
5 - Links úteis