Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Organization resource represents a company that has a signed agreement for 

provision of services with specific companies (InPost S.A., InPost Paczkomaty Sp. z o.o.
or InPost Express Sp. z o.o.) within Integer.pl Group of Companies


The Organization is created on the basis of the signed agreement, by the persons appointed on the part of Integer.pl Group of Companies Changes in the organization can be made only by an Integer GC employee.

Within the organization the user can manage shipments.

.



Panel
bgColor#f0f0f0
titleBGColor#f0f0f0
titleOn this page:

Table of Contents
maxLevel2
minLevel2
 


Authentication


Access to the resource requires provision of the correct and valid access token.

Getting information about the Organization


Collecting information about a particular organization the user has access to:

Code Block
GET /v1/organizations/:id


The resource has the following attributes:Organization Attribute:

AttributeType

Description

hrefstring

Absolute URL address to the resource

idinteger

Organization's ID

owner_idinteger

Organization Owner's ID

namestring

Organization name (company name)

tax_idstring

NIP

created_atdatetime

Organization's creation date

updated_atdatetime

Date of the last update of the organization

servicesArray[String]

List of services available for the organization

bank_account_number
string

Organization's bank account number

addressAddress

Object containing the organization's address. Address object structure:

AttributeType

Description

idstring

Address object ID

line1
string

Street

line2
string

Building number

streetstring

Street

building_numberstring

Building number

city
string

City

post_code
string

Postal code

country_code
string

Country code (2-3 characters)



Sample Organization resource in the JSON format:


Code Block
{
  "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"
  }
}

Information about errors

 The server may return the following errors

  • resource_not_found - if the organization does not exist
  • token_invalidthe user does not have access rights to a specific organization

List all organizations

List of all organizations which the user has access to

Code Block
GET /v1/organizations


(info) Resource is paged. More information at AXA General information. 

Parameters

Parameter

Description

sort_by

Determines the attribute by which the results are to be sorted.

Default: id

Possible:

- id

- name

- tax_id

- address

- created_at

sort_order

Determines the sorting type - descending(desc) or ascending (asc).

By default: ascending (asc)

Request example

Code Block
$ curl https://api-shipx-pl.easypack24.net/v1/organizations -H "Authorization: Bearer lkfjasd9f70y43ohriw...[ommited for brevity]..."

Response

In response, the server returns collections with the response code  200 OK:

Code Block
{
	"href": "https://api-shipx-pl.easypack24.net/v1/organizations",
	"count": 100,
	"page": 1,
	"per_page": 30,
	"items": [
		{
			"href": "https://api-shipx-pl.easypack24.net/v1/organizations/1",
			"id": 1,
			... other organization's attributes omitted for brevity ...
		},
		... other collection's items omitted for brevity ...
	]
}


Organization's statistics

List of the organization's statistics.

Code Block
GET /v1/organizations/:organization_id/statistics


Request example

Code Block
GET /v1/organizations/1/statistics

Response

In the response the server will return the following data:

Code Block
{
  "to_send": 23,
  "in_logistics": 31,
  "delivered": 58
}


Statistics parameters

ParameterDescription
to_send

• Returns the number of the organization's shipments to be shipped.         

• Shipment statuses: created, offers_prepared, offer_selected, confirmed     

in_logistics

• Returns the number of the organization's shipments in the logistic process.            

• Shipment statuses: dispatched_by_sender, collected_from_sender, taken_by_courier, adopted_at_source_branch, sent_from_source_branch,

adopted_at_sorting_center, sent_from_sorting_center, adopted_at_target_branch, out_for_delivery, ready_to_pickup, pickup_reminder_sent, pickup_time_expired, avizo, claimed, returned_to_sender

delivered

• Returns the number of the organization's delivered shipments.  

• Shipment statuses: delivered