Firstbase API
  • INTRODUCTION
    • REST API
    • Use Cases
      • User Management
      • Asset Management
      • Catalog and Ordering
  • GETTING STARTED
    • Generating your API Key
    • Authentication
    • Making requests
    • Pagination
    • Rate Limiting
    • Deprecations - WIP
    • Filtering - WIP
  • API Reference
    • Catalog
      • Skus
    • Inventory
      • Tags
      • Assignment
      • Archive
    • Orders
    • Shipments
    • Packages
    • Users
    • Specification
Powered by GitBook
On this page
  1. API Reference

Users

PreviousPackages

Last updated 7 months ago

List users

get
Authorizations
Query parameters
filterstringOptional

Fetch user with a given name or email address using SCIM operators

Examples:

emails.value eq "test@email.com"

name.givenName eq "James" and name.familyName eq "Bond"

startIndexintegerOptional

The 1-based start index of the first user to be returned

countintegerOptional

The number of users to be returned. A maximum of 50 users will be returned in a page.

attributesstringOptional

Comma-separated SCIM defined attributes to be returned. Required attributes are always returned

excludedAttributesstringOptional

Comma-separated SCIM defined attributes to be excluded. Required attributes cannot be excluded

Responses
200
List of users
application/scim+json
400
Bad Request
*/*
403
Forbidden
*/*
404
Not Found
*/*
get
GET /scim/v2/Users HTTP/1.1
Host: apipub.firstbasehq.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "totalResults": 102,
  "itemsPerPage": 1,
  "startIndex": 1,
  "Resources": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "addresses": [
        {
          "country": "US",
          "locality": "New York City",
          "postalCode": "10123",
          "region": "NY",
          "streetAddress": "123 Sesame Street\nSuite 103",
          "primary": true
        }
      ],
      "userName": "jenny.smith@example.com",
      "emails": [
        {
          "value": "jenny.smith@example.com",
          "primary": true
        }
      ],
      "name": {
        "familyName": "Smith",
        "givenName": "Jenny"
      },
      "phoneNumbers": [
        {
          "value": "1+555-867-5309",
          "primary": true
        }
      ],
      "urn:ietf:params:scim:schemas:extension:firstbase:1.0:User": {
        "packageId": "d1b0fd87-5fc9-410c-b641-0b7146896ccd",
        "startDate": "2022-02-01",
        "status": "ACTIVE",
        "skipUserActivation": false
      },
      "schemas": [
        "urn:ietf:params:scim:schemas:core:2.0:User",
        "urn:ietf:params:scim:schemas:extension:firstbase:1.0:User"
      ]
    }
  ],
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:ListResponse"
  ]
}

Get a user by id

get
Authorizations
Path parameters
idstringRequired

Unique id of the user

Query parameters
attributesstringOptional

Comma-separated SCIM defined attributes to be returned. Required attributes are always returned

excludedAttributesstringOptional

Comma-separated SCIM defined attributes to be excluded. Required attributes cannot be excluded

Responses
200
User has been found
application/scim+json
400
Bad Request
*/*
403
Forbidden
*/*
404
Unable to find user
application/scim+json
get
GET /scim/v2/Users/{id} HTTP/1.1
Host: apipub.firstbasehq.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "addresses": [
    {
      "country": "US",
      "locality": "New York City",
      "postalCode": "10123",
      "region": "NY",
      "streetAddress": "123 Sesame Street\nSuite 103",
      "primary": true
    }
  ],
  "userName": "jenny.smith@example.com",
  "emails": [
    {
      "value": "jenny.smith@example.com",
      "primary": true
    }
  ],
  "name": {
    "familyName": "Smith",
    "givenName": "Jenny"
  },
  "phoneNumbers": [
    {
      "value": "1+555-867-5309",
      "primary": true
    }
  ],
  "urn:ietf:params:scim:schemas:extension:firstbase:1.0:User": {
    "packageId": "d1b0fd87-5fc9-410c-b641-0b7146896ccd",
    "startDate": "2022-02-01",
    "status": "ACTIVE",
    "skipUserActivation": false
  },
  "schemas": [
    "urn:ietf:params:scim:schemas:core:2.0:User",
    "urn:ietf:params:scim:schemas:extension:firstbase:1.0:User"
  ]
}

Delete a user from Firstbase

delete

Deleting a User will start the Offboarding process for the user. This is a SOFT delete, in which the user will still have access to the Firstbase platform until offboarding has completed

Authorizations
Path parameters
idstringRequired

Unique id of the user

Responses
204
User has been deleted and offboarding has started
application/scim+json
400
Bad Request
*/*
403
Forbidden
*/*
404
Unable to find user
application/scim+json
delete
DELETE /scim/v2/Users/{id} HTTP/1.1
Host: apipub.firstbasehq.com
Authorization: YOUR_API_KEY
Accept: */*

No content

  • GETList users
  • GETGet a user by id
  • POSTCreate a new user within Firstbase
  • PUTUpdate an existing user within Firstbase
  • DELETEDelete a user from Firstbase

Create a new user within Firstbase

post
Authorizations
Query parameters
attributesstringOptional

Comma-separated SCIM defined attributes to be returned. Required attributes are always returned

excludedAttributesstringOptional

Comma-separated SCIM defined attributes to be excluded. Required attributes cannot be excluded

Body
idstring ยท uuidRead-onlyRequired
userNamestringRequired

The userName must match the primary email address.

Example: jenny.smith@example.com
schemasstring[]Required

The schemas defining the attributes of the resources.

Example: ["urn:ietf:params:scim:schemas:core:2.0:User","urn:ietf:params:scim:schemas:extension:firstbase:1.0:User"]
Responses
201
User has been created
application/scim+json
400
Bad Request
*/*
403
Forbidden
*/*
404
Unable to find organization or package
application/scim+json
409
Unable to create user due to conflict
application/scim+json
post
POST /scim/v2/Users HTTP/1.1
Host: apipub.firstbasehq.com
Authorization: YOUR_API_KEY
Content-Type: application/scim+json
Accept: */*
Content-Length: 664

{
  "addresses": [
    {
      "country": "US",
      "locality": "New York City",
      "postalCode": "10123",
      "region": "NY",
      "streetAddress": "123 Sesame Street\nSuite 103",
      "primary": true
    }
  ],
  "userName": "jenny.smith@example.com",
  "emails": [
    {
      "value": "jenny.smith@example.com",
      "primary": true
    }
  ],
  "name": {
    "familyName": "Smith",
    "givenName": "Jenny"
  },
  "phoneNumbers": [
    {
      "value": "1+555-867-5309",
      "primary": true
    }
  ],
  "urn:ietf:params:scim:schemas:extension:firstbase:1.0:User": {
    "packageId": "d1b0fd87-5fc9-410c-b641-0b7146896ccd",
    "startDate": "2022-02-01",
    "status": "ACTIVE",
    "skipUserActivation": false
  },
  "schemas": [
    "urn:ietf:params:scim:schemas:core:2.0:User",
    "urn:ietf:params:scim:schemas:extension:firstbase:1.0:User"
  ]
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "addresses": [
    {
      "country": "US",
      "locality": "New York City",
      "postalCode": "10123",
      "region": "NY",
      "streetAddress": "123 Sesame Street\nSuite 103",
      "primary": true
    }
  ],
  "userName": "jenny.smith@example.com",
  "emails": [
    {
      "value": "jenny.smith@example.com",
      "primary": true
    }
  ],
  "name": {
    "familyName": "Smith",
    "givenName": "Jenny"
  },
  "phoneNumbers": [
    {
      "value": "1+555-867-5309",
      "primary": true
    }
  ],
  "urn:ietf:params:scim:schemas:extension:firstbase:1.0:User": {
    "packageId": "d1b0fd87-5fc9-410c-b641-0b7146896ccd",
    "startDate": "2022-02-01",
    "status": "ACTIVE",
    "skipUserActivation": false
  },
  "schemas": [
    "urn:ietf:params:scim:schemas:core:2.0:User",
    "urn:ietf:params:scim:schemas:extension:firstbase:1.0:User"
  ]
}

Update an existing user within Firstbase

put
Authorizations
Path parameters
idstringRequired
Query parameters
attributesstringOptional

Comma-separated SCIM defined attributes to be returned. Required attributes are always returned

excludedAttributesstringOptional

Comma-separated SCIM defined attributes to be excluded. Required attributes cannot be excluded

Body
idstring ยท uuidRead-onlyRequired
userNamestringRequired

The userName must match the primary email address.

Example: jenny.smith@example.com
schemasstring[]Required

The schemas defining the attributes of the resources.

Example: ["urn:ietf:params:scim:schemas:core:2.0:User","urn:ietf:params:scim:schemas:extension:firstbase:1.0:User"]
Responses
200
User has been updated
application/scim+json
400
Bad Request
*/*
403
Forbidden
*/*
404
Unable to find person, organization or package
application/scim+json
409
Unable to update user due to conflict
application/scim+json
put
PUT /scim/v2/Users/{id} HTTP/1.1
Host: apipub.firstbasehq.com
Authorization: YOUR_API_KEY
Content-Type: application/scim+json
Accept: */*
Content-Length: 664

{
  "addresses": [
    {
      "country": "US",
      "locality": "New York City",
      "postalCode": "10123",
      "region": "NY",
      "streetAddress": "123 Sesame Street\nSuite 103",
      "primary": true
    }
  ],
  "userName": "jenny.smith@example.com",
  "emails": [
    {
      "value": "jenny.smith@example.com",
      "primary": true
    }
  ],
  "name": {
    "familyName": "Smith",
    "givenName": "Jenny"
  },
  "phoneNumbers": [
    {
      "value": "1+555-867-5309",
      "primary": true
    }
  ],
  "urn:ietf:params:scim:schemas:extension:firstbase:1.0:User": {
    "packageId": "d1b0fd87-5fc9-410c-b641-0b7146896ccd",
    "startDate": "2022-02-01",
    "status": "ACTIVE",
    "skipUserActivation": false
  },
  "schemas": [
    "urn:ietf:params:scim:schemas:core:2.0:User",
    "urn:ietf:params:scim:schemas:extension:firstbase:1.0:User"
  ]
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "addresses": [
    {
      "country": "US",
      "locality": "New York City",
      "postalCode": "10123",
      "region": "NY",
      "streetAddress": "123 Sesame Street\nSuite 103",
      "primary": true
    }
  ],
  "userName": "jenny.smith@example.com",
  "emails": [
    {
      "value": "jenny.smith@example.com",
      "primary": true
    }
  ],
  "name": {
    "familyName": "Smith",
    "givenName": "Jenny"
  },
  "phoneNumbers": [
    {
      "value": "1+555-867-5309",
      "primary": true
    }
  ],
  "urn:ietf:params:scim:schemas:extension:firstbase:1.0:User": {
    "packageId": "d1b0fd87-5fc9-410c-b641-0b7146896ccd",
    "startDate": "2022-02-01",
    "status": "ACTIVE",
    "skipUserActivation": false
  },
  "schemas": [
    "urn:ietf:params:scim:schemas:core:2.0:User",
    "urn:ietf:params:scim:schemas:extension:firstbase:1.0:User"
  ]
}