Last active
May 7, 2020 20:34
-
-
Save leomp12/3ec7a835dedb5858da57a6ec9f5e81ad to your computer and use it in GitHub Desktop.
Revisions
-
leomp12 revised this gist
May 7, 2020 . 1 changed file with 44 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -24,10 +24,6 @@ POST /orders/:_id/payments_history.json Exemplo com informações adicionais no corpo do POST: ```json { "transaction_id": "fe1230000000000000000005", @@ -50,4 +46,47 @@ POST /orders/:_id/payments_history.json - `in_dispute` - `refunded` - `voided` - `unknown` ## Atualizando status de entrega Basta inserir uma entrada via POST no subresource `fulfillments`: ``` POST /orders/:_id/fulfillments.json ``` ```json { "date_time": "2020-05-07T20:12:47.924Z", "status": "shipped" } ``` > No exemplo acima o status de entrega do pedido `:_id` será alterado para **enviado**. Exemplo com informações adicionais no corpo do POST: ```json { "shipping_line_id": "af1230000000000000000005", "date_time": "2020-05-07T20:12:47.924Z", "status": "delivered", "notification_code": "TN1234567", "flags": [ "azul-cargo" ] } ``` #### Possíveis status de fulfillment - `invoice_issued` - `in_production` - `in_separation` - `ready_for_shipping` - `shipped` - `delivered` - `returned_for_exchange` - `received_for_exchange` - `returned` -
leomp12 revised this gist
May 7, 2020 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -40,7 +40,8 @@ POST /orders/:_id/payments_history.json } ``` #### Possíveis status de transação - `pending` - `under_analysis` - `authorized` -
leomp12 renamed this gist
May 7, 2020 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
leomp12 created this gist
May 7, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,52 @@ # E-Com Plus - Atualizar status de pedido via Store API [Referência da API](https://developers.e-com.plus/docs/api/#/store/orders) A forma recomendada de promover uma alteração de status de transações ou entrega (fulfillment) é inserindo registros com (pelo menos) o status atual e data/hora da última atualização. ## Atualizando status financeiro Basta inserir uma entrada via POST no subresource `payments_history`: ``` POST /orders/:_id/payments_history.json ``` ```json { "date_time": "2020-05-07T20:12:47.924Z", "status": "paid" } ``` > No exemplo acima o status financeiro do pedido `:_id` será alterado para **pago**. Exemplo com informações adicionais no corpo do POST: ``` POST /orders/:_id/payments_history.json ``` ```json { "transaction_id": "fe1230000000000000000005", "date_time": "2020-05-07T20:12:47.924Z", "status": "paid", "notification_code": "WH1234567", "flags": [ "pdv-1" ] } ``` Possíveis status: - `pending` - `under_analysis` - `authorized` - `unauthorized` - `paid` - `in_dispute` - `refunded` - `voided` - `unknown`