Closed eudovic closed 4 years ago
more debug
GET /accounts/v1/contacts HTTP/1.1 Host: api.sageone.com Accept: . Content_Type: application/x-www-form-urlencoded User-Agent: DevelopRaft Authorization: Bearer 7cd38a7849f0da749f470672aa98ec33f61006b2 X-Signature: uGgIA0T3gO05qlOrtzMilzkwgdQ= X-Nonce: ea389a21243975978d0157cce23f04a5cea75d1131e87d13ff2af40c362f59be
< HTTP/1.1 404 Not Found < Date: Thu, 15 Aug 2019 18:02:41 GMT < Content-Type: text/html; charset=utf-8 < Transfer-Encoding: chunked < Connection: keep-alive < Server: openresty < Set-Cookie: __cfduid=d00884c62485f7b1e0534b7800ee044cd1565892161; expires=Fri, 14-Aug-20 18:02:41 GMT; path=/; domain=.sageone.com; HttpOnly < Status: 404 Not Found < Strict-Transport-Security: max-age=31536000 < Vary: Accept-Encoding < X-Frame-Options: SAMEORIGIN < X-Request-Id: bc795d67-0461-43c2-ab6f-f1dc4227c15b < X-Runtime: 0.026203 < X-Server: br-production-nfe-frontend-920 (production) < X-Server: br-production-modproxy-ansible-56 < Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct" < CF-RAY: 506d14b949e9a723-DUB
can you help me?
Hi @eudovic,
Might it be that you are using the API for the Sage One product from Brazil (https://br.sageone.com/)?
Please refer to the documentation of the Brazilian API, it is powered by a different technology stack and is unfortunately not compatible with this sample app.
Here is the documentation: https://github.com/Sage/sageone_br_nfe_documentacao_api/wiki
I'm pretty sure that the endpoint equivalent for contacts
is the endpoint clients
, so you can dive in here: https://github.com/Sage/sageone_br_nfe_documentacao_api/wiki/Clientes
I hope that helps, apologies for the trouble. Have a great weekend and happy coding!
Thats Right, Now I can get clients but I cant record.. I dont see how to create a new client or product in pt-br documentation.. https://github.com/Sage/sageone_br_nfe_documentacao_api/wiki/Clientes Can you help me?
Hello @eudovic,
Unfortunately it is not possible to create a new client that way, the only way is when you are creating a new invoice (https://github.com/Sage/sageone_br_nfe_documentacao_api/wiki/NFe) and the client is created if he does not exist yet.
Ok Isabela! Acredito que pelo seu nome, sua língua nativa também seja o português... Me esclareça algumas duvidas por gentileza... Minha intenção única com a sage é a de emitir notas ficais, pois ja tenho o cadastro de clientes e produtos no meu bd... Posso emitir uma nota sem cadastrar estes produtos e clientes no bd da sage?? Outra coisas é sobre quais os campos mínimos obrigatórios para emissão de nota. Aguardo retorno! E muito obrigado pela atenção!
Olá @eudovic, Quando vc for enviar o POST para criar a nota ele vai cadastrar no db da sage o cliente e os produtos que estiverem no seu json. Sobre os campos obrigatórios vou verificar e já posto aqui.
Bom dia @eudovic,
Esses são os campos mínimos para se ter uma NF-e pronta para ser emitida, conseguiria tentar e nos avisar se obteve sucesso? Tenha uma ótima semana!
'carriage_modality' = '9' 'client[kind]' = 'organization' // person | organization 'client[name]' = 'Nome Fantasia' 'client[cpf]' = '06087556990' ou 'client[cnpj]' = '15522500000160' 'client[blank_tax_number]' = false (true se tiver IE) 'client[tax_number]' = '9471714027' // inscrição estadual 'client[icms_contributor]' = false 'client[address][postal_code]' = '82540000' 'client[address][street]' = 'Rua Ary Barroso' 'client[address][number]' = '1234' 'client[address][neighborhood]' = 'Boa Vista' 'client[address][city_ibge_code]' = '4106902' 'items[0][quantity]' = 1 'items[0][price]' = 15.43 'items[0][product][code]' = 'CBA' 'items[0][product][name]' = 'odatropmI' 'items[0][product][unit]' = 'kg' 'items[0][product][price]' = 15.43
Ok, fiz o teste gerando um rascunho e me retornou com sucesso {"success":true,"url":"http://app.br.sageone.com/notafiscal/incoming_nfes/40263454"}
porem ao rasucunho ficoui com valor 0, sem nenhum produto, e tb nao vi onde se encontravam os dados do cliente...
este foi o json que usei no teste
{'carriage_modality' : '9' , 'client[kind]' : 'organization', 'client[name]' : 'Emerson Udovic' , 'client[cpf]' : '****' , 'client[blank_tax_number]' : false , 'client[icms_contributor]' : false, 'client[address][postal_code]' : '17380000' , 'client[address][street]' : 'Rua Joao Batista Crivelari' , 'client[address][number]' : '395', 'client[address][neighborhood]' :'Brotas' , 'client[address][city_ibge_code]' : '4106902' , 'items[0][quantity]' : 1 , 'items[0][price]' : 15.43 , 'items[0][product][code]' : 'CBA', 'items[0][product][name]' : 'odatropmI' , 'items[0][product][unit]' : 'kg' , 'items[0][product][price]' : 15.43}
Consegue me dar uma ideia do que está aconcendo?? Algo errado com os parâmetros que estou enviando?
Me ajuda please?!?!?!?!!?!?!!
Hello @eudovic , is your problem still existing?
If you have questions about the Sage Business Cloud Accounting API or want to report problems, then the accounting api section of sagecity.com is the perfect place.
Regards, Robert
Hello @eudovic, sorry we can not help you. This application use a completely different API. You need the call support of the brazilian product.
Regards, Robert
When I try to get anything from api I have The page you were looking for doesn't exist.
You may have mistyped the address or the page may have moved. I debuged my curl and I got:
the header: Array ( [0] => Accept: . [1] => Content_Type: application/x-www-form-urlencoded [2] => User-Agent: DevelopRaft [3] => Authorization: Bearer ****MYDATA*** [4] => X-Signature: **MYDATA* [5] => X-Nonce: ***MYDATA**
The curls Obj: Array ( [url] => https://api.sageone.com/accounts/v1/countries [content_type] => text/html; charset=utf-8 [http_code] => 404 [header_size] => 739 [request_size] => 331 [filetime] => -1 [ssl_verify_result] => 0 [redirect_count] => 0 [total_time] => 1.124176 [namelookup_time] => 0.124834 [connect_time] => 0.216177 [pretransfer_time] => 0.414346 [size_upload] => 0 [size_download] => 728 [speed_download] => 647 [speed_upload] => 0 [download_content_length] => -1 [upload_content_length] => -1 [starttransfer_time] => 1.124044 [redirect_time] => 0 [redirect_url] => [primary_ip] => 52.30.132.139 [certinfo] => Array ( )
)
It return Me: Header HTTP/1.1 404 Not Found Date: Thu, 15 Aug 2019 01:21:35 GMT Content-Type: text/html; charset=utf-8 Transfer-Encoding: chunked Connection: keep-alive Server: openresty Set-Cookie: __cfduid=da70b4cec3316b976bd32173a12b2eb0f1565832094; expires=Fri, 14-Aug-20 01:21:34 GMT; path=/; domain=.sageone.com; HttpOnly Status: 404 Not Found Strict-Transport-Security: max-age=31536000 Vary: Accept-Encoding X-Frame-Options: SAMEORIGIN X-Request-Id: edcecd2f-142b-4d89-b14a-96beecbf4314 X-Runtime: 0.018063 X-Server: br-production-nfe-frontend-924 (production) X-Server: br-production-modproxy-ansible-55 Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct" CF-RAY: 50675a406bc0b7d5-CDG
Body The page you were looking for doesn't exist.
You may have mistyped the address or the page may have moved.
No One Json is return for me
Whats is wrong?