- Created by anagorski, last modified by Michał Machowski on Dec 18, 2023
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 12 Current »
Zasób Organization
reprezentuje firmę, która posiada podpisaną umowę na świadczenie usług.
W ramach organizacji użytkownik ma możliwość zarządzania przesyłkami.
Na tej stronie
Struktura
Zasób Organization
posiada następujące atrybuty:
Atrybut | Typ | Opis |
---|---|---|
| integer | ID Organizacji |
| integer | ID Właściciela organizacji |
| string | Nazwa organizacji (nazwa firmy) |
| string | NIP |
| string | Numer konta bankowego organizacji |
| Array[String] | Zakres usług |
| Array[String] | Lista dostępnych dla organizacji usług |
| Address | Obiekt zawierający adres organizacji |
| datetime | Data utworzenia organizacji |
| datetime | Data ostatniej aktualizacji organizacji |
Struktura obiektu Address
:
Atrybut | Typ | Opis |
---|---|---|
| string | Identyfikator obiektu adres |
| string | Ulica |
| string | Numer budynku |
| string | Ulica |
| string | Numer budynku |
| string | Miasto |
| string | Kod pocztowy |
| string | Kod kraju (2-3 znaki) |
Przykład zasobu Organization
w formacie JSON:
HTTP/1.1 200 OK Content-Type: application/json { "href": "http://api-shipx-pl.easypack24.net/v1/organizations", "count": 1, "page": 1, "per_page": 100, "items": [ { "href": "https://api-shipx-pl.easypack24.net/v1/organizations/1", "id": 1, "owner_id": 11, "name": "ShpiX", "tax_id": "PL1234567890", "bank_account_number": null, "carriers": [ "inpost_locker", "inpost_letter", "inpost_courier" ], "services": [ "inpost_locker_allegro", "inpost_locker_pass_thru", "inpost_locker_standard", "inpost_letter_allegro", "inpost_courier_palette", "inpost_courier_allegro", "inpost_courier_standard", "inpost_courier_express_1000", "inpost_courier_express_1200", "inpost_courier_express_1700", "inpost_courier_c2c", "inpost_locker_standard_smart", "inpost_locker_allegro_smart" ], "address": { "id": 123456, "street": "Pana Tadeusza", "building_number": "4", "line1": null, "line2": null, "city": "Kraków", "post_code": "30-727", "country_code": "PL" }, "invoice_address": null, "contact_person": { "id": 12344, "email": null, "phone": null, "first_name": null, "last_name": null }, "created_at": "2016-07-27T12:00:33.923+02:00", "updated_at": "2023-10-30T12:59:09.555+01:00" } ] } |
Lista organizacji
Lista organizacji, do których użytkownik ma dostęp.
Zasób jest stronicowany. Więcej informacji na stronie [1.3.0] API Informacje ogólne
GET /v1/organizations |
Sortowanie wyników
Parametr | Opis |
---|---|
| Określa atrybut po którym mają zostać posortowane wyniki.
|
| Określa rodzaj sortowania - w kolejności malejącej ( |
Przykład zapytania
$ curl -X GET https://api-shipx-pl.easypack24.net/v1/organizations -H "Authorization: Bearer token" -H 'Content-Type: application/json' |
Odpowiedź
HTTP/1.1 200 OK Content-Type: application/json { "href": "http://api-shipx-pl.easypack24.net/v1/organizations", "count": 1, "page": 1, "per_page": 100, "items": [ { "href": "https://api-shipx-pl.easypack24.net/v1/organizations/1", "id": 1, "owner_id": 11, "name": "ShpiX", "tax_id": "PL1234567890", "bank_account_number": null, "carriers": [ "inpost_locker", "inpost_letter", "inpost_courier" ], "services": [ "inpost_locker_allegro", "inpost_locker_pass_thru", "inpost_locker_standard", "inpost_letter_allegro", "inpost_courier_palette", "inpost_courier_allegro", "inpost_courier_standard", "inpost_courier_express_1000", "inpost_courier_express_1200", "inpost_courier_express_1700", "inpost_courier_c2c", "inpost_locker_standard_smart", "inpost_locker_allegro_smart" ], "address": { "id": 12345, "street": "Pana Tadeusza", "building_number": "4", "line1": null, "line2": null, "city": "Kraków", "post_code": "30-727", "country_code": "PL" }, "invoice_address": null, "contact_person": { "id": 1244, "email": null, "phone": null, "first_name": null, "last_name": null }, "created_at": "2016-07-27T12:00:33.923+02:00", "updated_at": "2023-10-30T12:59:09.555+01:00" } ] } |
Szczegóły organizacji
Pobieranie informacji o określonej organizacji, do której dostęp ma użytkownik.
GET /v1/organizations/:id |
Przykład zapytania
$ curl -X GET https://api-shipx-pl.easypack24.net/v1/organizations/1 -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/34", "id": 34, "owner_id": 1, "tax_id": "3973902075", "name": "Random org name39739020755741", "created_at": "2016-10-04T10:36:49.631+02:00", "updated_at": "2016-10-04T10:36:49.631+02:00", "services": [ "inpost_locker_standard", "inpost_courier_standard" ], "address": { "id": 808, "line1": null, "line2": null, "street": "Ulica jakaś39739020755741", "building_number": "Budynek39739020755741", "city": "Szczecin39739020755741", "post_code": "22-100", "country_code": "PL" } } |
Informacje o błędach
Serwer może zwrócić następujące błędy
resource_not_found
- w przypadku gdy organizacja nie istniejetoken_invalid
- użytkownik nie ma praw dostępu do określonej organizacji
Statystyki organizacji
Lista statystyk danej organizacji.
GET /v1/organizations/:organization_id/statistics |
Kryteria wyszukiwania
Parametr | Opis |
---|---|
|
|
|
|
|
|
Przykład zapytania
curl -X GET https://api-shipx-pl.easypack24.net/v1/organizations/1/statistics -H 'Authorization: Bearer token' -H 'Content-Type: application/json' |
Odpowiedź
{ "to_send": 23, "in_logistics": 31, "delivered": 58 } |
- No labels