1. Organizations
  2. Retrieve Organizations

Organizations

Retrieve Organizations

Retrieve Organization

This endpoint enables the retrieval of comprehensive organization information, including configuration settings, carrier credentials, and tenant relationships.

GET
`/v1/organizations/:organization`

Request Parameters

The endpoint accepts optional query parameters to customize the response:

js
        {
  tenant_ids?: string[]          // Filters tenant relationships
}

      
js
        const response = await fetch(`https://api.packagex.io/v1/org`, {
  method: "GET",
  headers: {
    "PX-API-KEY": process.env.PX_API_KEY,
    "Content-Type": "application/json",
  },
});

const organization = response.data;

      

List Organizations

GET
`/v1/organizations`

You will never have more than one organization scoped to an API key. Therefore, this endpoint will always return a single organization, just in an array.

js
        const response = await fetch(`https://api.packagex.io/v1/organizations`, {
  method: "GET",
  headers: {
    "PX-API-KEY": process.env.PX_API_KEY,
    "Content-Type": "application/json",
  },
}).then((res) => res.json());

const org = response.data[0]; //There will always only be one response
const pagination = response.pagination; //The has_more property will be null

      

Retrieve Organization Payouts Profile

This endpoint provides access to detailed information about an organization's payout configuration and status.

GET
`/v1/organizations/:organization_id/payouts`

Example Request

js
        const response = await fetch(`https://api.packagex.io/v1/organizations/${org_id}/payouts`, {
  method: 'GET',
  headers: {
    'PX-API-KEY': process.env.PX_API_KEY,
    'Content-Type': 'application/json'
  }
});