PARA COMEÇAR ESTÁ INTEGRAÇÃO É NECESSÁRIO CRIAR UM APP NA NUVEMSHOP DADOS DE ACESSO (PARTNERS) Host: https://partners.nuvemshop.com.br/ Usuário: fernando@infomastersistemas.com.br Senha: caps.lock#1234 DADOS DE ACESSO (LOJA DEMO INFOMASTER) https://demoinfomastersistemas.lojavirtualnuvem.com.br/admin/apps/ Usuário: fernando@infomastersistemas.com.br Senha: caps.lock#1234 ADICIONANDO E AUTENTICANDO O APP A LOJA DEMO INFOMASTER A URL ABAIXO SERVE PARA AUTORIZAR O APP A SER USADO NA LOJA DEMO INFOMASTER 2742 CORRESPONDE AO ID DO APP 1° URL https://www.tiendanube.com/apps/2742/authorize?state=csrf-code APÓS ISSO SERÁ OCORRERÁ UM REDIRECIONAMENTO PARA A URL DEFINIDA NO APP A REQUISIÇÃO DEVOLVERÁ UM ARGUMENTO CODE, QUE DEVERÁ SER USADO NA URL ABAIXO EXECUTAR A URL ABAIXO NO CMD O ÚLTIMO ARGUMENTO(CODE) É DINÂMICO(SUBSTITUIR PELO ÚLTIMO GERADO) A URL NÃO FUNCIONA COM ASPAS SIMPLES, DEIXAR AS ASPAS DUPLAS curl https://www.tiendanube.com/apps/authorize/token --data "client_id=2742&client_secret=zn0zEgg4jqtyv3u6tgBz70Yngk0PeAvvQHNuSdUZoC0dn9jb&grant_type=authorization_code&code=34b7da7c49099b6eaacc4feb9bf7d07a5d5b3905" DADOS RETORNADOS APÓS A AUTENTICAÇÃO DO APP O ACESS_TOKEN É USADO NAS REQUISIÇÕES A API DA NUVEMSHOP { "access_token":"a4214b529e7920f831b0e71adb88b60378eaa10e", "token_type":"bearer", "scope":"write_products,write_coupons,write_customers,write_orders,write_draft_orders", "user_id":1577128 } GET curl -H "Authentication: bearer 68ba8de4d68fa278e2e4299a1e73a2e94215e2b8" \ -H "User-Agent: ERP Infomaster (atendimento@infomastersistemas.com.br)" \ https://api.tiendanube.com/v1/1577128/products curl -H "Authentication: bearer a4214b529e7920f831b0e71adb88b60378eaa10e" \ -H "User-Agent: ERP Infomaster (atendimento@infomastersistemas.com.br)" \ https://api.tiendanube.com/v1/1577128/products SET curl -H 'Authentication: bearer a4214b529e7920f831b0e71adb88b60378eaa10e ' \ -H 'Content-Type: application/json' \ -H 'User-Agent: ERP Infomaster (atendimento@infomastersistemas.com.br)' \ -d '{ "name": "My new product" }' \ https://api.tiendanube.com/v1/1577128/products PRODUTO curl -H "Authentication: bearer a4214b529e7920f831b0e71adb88b60378eaa10e" \ -H "Content-Type: application/json" \ -H "User-Agent: ERP Infomaster (atendimento@infomastersistemas.com.br)" \ -d "{ \"name\": \"My new product\" }" \ https://api.tiendanube.com/v1/1577128/products MARCAS DE PRODUTO curl -H "Authentication: bearer a4214b529e7920f831b0e71adb88b60378eaa10e" \ -H "Content-Type: application/json" \ -H "User-Agent: ERP Infomaster (atendimento@infomastersistemas.com.br)" \ -d "{ \"name\": \"Produto com marca\", \"brand\": \"Marca01\" }" \ https://api.tiendanube.com/v1/1577128/products GRUPOS DE PRODUTOS(CATEGORIA) curl -H "Authentication: bearer a4214b529e7920f831b0e71adb88b60378eaa10e" \ -H "Content-Type: application/json" \ -H "User-Agent: ERP Infomaster (atendimento@infomastersistemas.com.br)" \ -d "{ \"name\": \"Roupas\", \"description\": \"Categoria de roupas\" }" \ https://api.tiendanube.com/v1/1577128/categories PRODUTO curl -H "Authentication: bearer a4214b529e7920f831b0e71adb88b60378eaa10e" \ -H "Content-Type: application/json" \ -H "User-Agent: ERP Infomaster (atendimento@infomastersistemas.com.br)" \ -d "{ \"name\": \"My new product\" }" \ https://api.tiendanube.com/v1/1577128/products MARCAS DE PRODUTO curl -H "Authentication: bearer a4214b529e7920f831b0e71adb88b60378eaa10e" \ -H "Content-Type: application/json" \ -H "User-Agent: ERP Infomaster (atendimento@infomastersistemas.com.br)" \ -d "{ \"name\": \"Produto com marca\", \"brand\": \"Marca01\" }" \ https://api.tiendanube.com/v1/1577128/products GRUPOS DE PRODUTOS(CATEGORIA) curl -H "Authentication: bearer a4214b529e7920f831b0e71adb88b60378eaa10e" \ -H "Content-Type: application/json" \ -H "User-Agent: ERP Infomaster (atendimento@infomastersistemas.com.br)" \ -d "{ \"name\": \"Roupas\", \"description\": \"Categoria de roupas\" }" \ https://api.tiendanube.com/v1/1577128/categories