Page tree
Skip to end of metadata
Go to start of metadata

The User resource represents the object of the user who gains access to the Ship X platform data.
The user is identified by a unique number, known as InPost ID. This number is unchanged.


On this page

 

Authentication

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

Zasób User 

AttributeTypeDescription
hrefString

Absolute URL to the resource.

idInteger

Unique user ID (InPost ID).

emailString

E-mail address assigned to the user's account.

first_nameString

User's first name.

last_nameString

User's surname.

statusString

User's status

updated_atDateTime

Last update of the user's profile.

created_atDateTime

Date created of the user's profile.

Sample User resource in the JSON format:

{
	"href": "https://api-shipx-pl.easypack24.net/v1/users/1",
	"id": 1,
	"email": "example@email.com",
	"first_name": "Bogus",
	"last_name": "Name",
    "status": "active",
	"updated_at": "2015-09-29T15:22:00.000+02:00",
	"created_at": "2015-09-29T15:22:00.000+02:00"
}


List of the Organization's users

Collecting the list of the Organization's users:

GET /v1/organizations/:id_organizacji/users

(info) The resource is paged. 

Access to the resource:


    • the owner of the organization have access to the full list of users,
    • a regular user of the organization sees only themselves on the list.

Parameters


Parameter

Description

sort_by

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

By default: id

Possible: id, email, phone, full_name, created_at

sort_order

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

By default: ascending (asc)

Possible: asc, desc

q

Allows for searching for users with a preset phrase.


Sample request

$ curl https://axa.shipx.pl.easypack24.net/v1/users \
	-H 'Authorization: Bearer lkfjasd9f70y43ohriw...[ommited for brevity]...'

Response 

In reply to the sent request the server will return a collection with the list of the User resource objects.

Example:

HTTP/1.1 200 OK
Content-Type: application/json
 
{
	"href": "https://axa.shipx.pl.easypack24.net/v1/users",
	"count": 123,
	"page": 1,
	"per_page": 30,
	"items": [
		{
			"href": "https://axa.shipx.pl.easypack24.net/v1/users/1",
			"id": 1,
			... other User's attributes omitted for brevity ...
		},
		{
			"href": "https://axa.shipx.pl.easypack24.net/v1/users/2",
			"id": 2,
			... other User's attributes omitted for brevity ...
		}
		... other collection's items omitted for brevity ...
	]
}
  • No labels