Skip to content

Commit

Permalink
Add documentation for tracking details endpoint in orders API
Browse files Browse the repository at this point in the history
  • Loading branch information
Georgemanif committed Jun 26, 2024
1 parent b0a2636 commit 1e15109
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
:request:
:url: https://api.skroutz.gr/merchants/ecommerce/orders/191128-1234567/tracking_details
:headers:
:accept: application/vnd.skroutz+json; version=3.0
:authorization: Bearer xWmjOaQmNgLt3dVIYBGkWVWhbrcdg4XfYqS3Jb1dMVHvGIBJcPuzVQYjH-XKenxsZgFW8DSgc9f2fI_MBVBHNw==
:params:
:tracking_details:
- :courier: "acs"
:tracking_code: "224085551"
:verb: :post
:response:
:status: 200
:headers:
Date: Wed, 6 Jul 2022 12:12:26 GMT
Connection: keep-alive
Content-Length: 6400
Server: h2o (Debian)
Content-Type: application/json; charset=utf-8
X-Meta-Client-Id: 27951bdf06a65ea4
Cache-Control: no-cache
X-Request-Id: 989369834
X-Runtime: 0.021923
X-App: as103_ssl
X-Varnish: 989369834
Age: 0
Via: 1.1 varnish (Varnish/5.0)
X-Origin: lb2
X-Cache: MISS
X-Cached: skroutz miss(0)
:body: '{"success":true}'
8 changes: 8 additions & 0 deletions source/localizable/smart_cart/_order_object.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -198,3 +198,11 @@ ID | Label | Requires Available
`4` | `Περιορισμένα τεμάχια` | True
`5` | `To προϊόν καταργήθηκε` | False
`6` | `Λάθος ταξινόμηση προϊόντος` | False


#### Tracking details option: Courier
These are the possible courier values when [updating tracking details](/smart_cart/orders_api/#update-tracking-details-fbm-only)

Name | Type | Value |
------------ | ------ | ----- |
`courier` | String | `acs`, `dhl`, `geniki_taxydromiki`, `dpd`, `gls`
26 changes: 26 additions & 0 deletions source/localizable/smart_cart/orders_api.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,32 @@ Only one file is allowed per order. If the file is already uploaded, it will by
</p>
</blockquote>

### Update tracking details (FBM only)
To allow shipment tracking, you need to provide the `courier` and `tracking_code` for each order shipment.

> <i class="fa fa-exclamation-triangle"></i>
> This endpoint is available only for FBM (Fulfilled By Merchant) orders
>
> <i class="fa fa-exclamation-triangle"></i>
>The existing API endpoint is limited to updating tracking details only for orders shipped to customers and does not currently support return orders.
>These should be still handled through merchants panel for the time being.

<pre class="terminal">
POST /merchants/ecommerce/orders/:code/tracking_details
</pre>


<%= render_recording :merchants_ecommerce_orders_tracking_details %>

<pre class="terminal">
curl -X POST https://api.skroutz.gr/merchants/ecommerce/orders/191128-1234567/tracking_details \
-H 'Accept: application/vnd.skroutz+json; version=3.0' \
-H 'Content-Type: application/json; charset=utf-8' \
-H 'Authorization: Bearer your_access_token_here' \
-d '{ "tracking_details": [ { "courier":"acs", "tracking_code":"224085551" } ] }'
</pre>


## Error handling

In case of errors, the response will have a representative HTTP status code
Expand Down

0 comments on commit 1e15109

Please sign in to comment.