You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 4
Punktu odbioru definiują fizyczne adres, z których może nastąpić odbiór przesyłek przez kuriera, które zostały określone w ramach zlecenia odbioru.
Na tej stronie
Zasób DispatchPointposiada następujące atrybuty:
DispatchPoint
Atrybut
Typ
Opis
Poprawne wartości
href
Integer
Adres URI do zasobu
id
String
ID punktu odbioru
name
Nazwa punktu odbioru
office_hours
Godziny funkcjonowania punktu
phone
Numer telefonu do punktu
email
Adres e-mail punktu
comments
Object
Dodatkowe informacje
address
Adres
status
Status
created, activated, suspended
created
activated
suspended
Przykład zasobu DispatchPoint w formacie JSON:
{ "href": "https://api-shipx-pl.easypack24.net/v1/dispatch_points/1", "id": 1, "name": "My dispatch point", "office_hours": "8-16", "phone": "777888999", "email": null, "comments": null, "status": "created", "address": { "id": 230, "street": "Długa", "building_number": "24", "city": "Krakow", "post_code": "30-624", "country_code": "PL" } }
Dostęp do zasobu wymaga podania prawidłowego i ważnego access tokenu.
Lista punktów odbioru w ramach określonej organizacji.
Aby pobrać listę punktów odbioru dla określonej organizacji, użytkownik musi być jej członkiem.
GET /v1/organizations/:organization_id/dispatch_points
Przykładowe zapytanie
curl -X GET https://api-shipx-pl.easypack24.net/v1/organizations/1/dispatch_points -H 'Authorization: Bearer token' -H 'Content-Type: application/json'
Odpowiedź
HTTP/1.1 200 OK Content-Type: application/json { "href": "https://api-shipx-pl.easypack24.net/v1/organizations/1/dispatch_points", "count": 15, "per_page": 30, "page": 1, "items": [ { "href": "https://test.api.shipx.pl.easypack24.net/v1/dispatch_points/1", "id": 1, "name": "My dispatch point", "office_hours": "8-16", "phone": "777888999", "email": null, "comments": null, "status": "created", "address": { "id": 230, "street": "Długa", "building_number": "24", "city": "Krakow", "post_code": "30-624", "country_code": "PL" } } ] }
Informacje o błędach
Błędy jakie mogą wystąpić podczas pobierania listy zleceń odbioru:
resource_not_found - organizacja, dla której użytkownik chce pobrać listę zleceń odbioru nie istnieje,
resource_not_found
forbidden - token nie uprawnia do pobrania listy zleceń odbioru dla wybranej organizacji.
forbidden
GET /v1/dispatch_points/:id
Przykład zapytania
curl -X GET https://api-shipx-pl.easypack24.net/v1/dispatch_points/1 -H 'Authorization: Bearer token' -H 'Content-Type: application/json'
HTTP/1.1 200 OK Content-Type: application/json { "href": "https://test.api.shipx.pl.easypack24.net/v1/dispatch_points/1", "id": 1, "name": "My dispatch point", "office_hours": "8-16", "phone": "777888999", "email": null, "comments": null, "status": "created", "address": { "id": 230, "street": "Długa", "building_number": "24", "city": "Krakow", "post_code": "30-624", "country_code": "PL" } }
resource_not_found - punkt odbioru o podanym ID nie istnieje