Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Warning!

Resource is available only in: PL, IT

Resource User represents user object, which has access to Ship X platform data.

User is identified by unique number - InPost ID. This ID is immutable.

On this page

 

Structure

Resource User has attributes:

AttributeTypeDescriptionAvailability
idIntegerUnique user ID (InPost ID).PL, IT
emailStringE-mail assigned to user account.PL, IT
first_nameStringFirst name.PL, IT
last_nameStringLast name.PL, IT
statusStringUser status.PL, IT
updated_atDateTimeLast update.PL, IT
created_atDateTimeCreation date.PL, IT

Example  in JSON:

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



Authorization

Access to resource requires correct and valid access token.


User List

Access to resource::

  • owner of organization has access to full list of users,
  • normal user has ability to see only himself.

(info) Resource is paged - more information

GET /v1/organizations/:organization_id/users

Search criteria

ParameterDescriptionAvailability
q

Allows to search user by given phrase.

PL, IT

Sorting

ParameterDescriptionAvailability
sort_byDefault: id
Available: id, email, phone, full_name, created_at 
PL, IT
sort_orderDefault: asc
Available: asc, desc
PL, IT

Request example

curl -X GET https://api-shipx-pl.easypack24.net/v1/users -H 'Authorization: Bearer token' -H 'Content-Type: application/json'

Response

In response server returns collection with list of users

HTTP/1.1 200 OK
Content-Type: application/json
{
	"href": "https://api-shipx-pl.easypack24.net/v1/users",
	"count": 123,
	"page": 1,
	"per_page": 30,
	"items": [
		 { 
			"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" 
		},
		{...}
	]
}



  • No labels