This is Payabli documentation. For a complete page index, fetch https://docs.payabli.com/llms.txt — append .md to any page URL for lightweight markdown. For section-level indexes, query parameters, and other AI-optimized access methods, see https://docs.payabli.com/ai-agents.md

# Get organization

GET https://api-sandbox.payabli.com/api/Organization/read/{orgId}

Retrieves details for an organization by ID. 

Reference: https://docs.payabli.com/developers/api-reference/organization/get-organization

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: payabliApi
  version: 1.0.0
paths:
  /Organization/read/{orgId}:
    get:
      operationId: get-organization
      summary: Get organization
      description: 'Retrieves details for an organization by ID. '
      tags:
        - subpackage_organization
      parameters:
        - name: orgId
          in: path
          description: The numeric identifier for organization, assigned by Payabli.
          required: true
          schema:
            type: integer
        - name: requestToken
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_:OrganizationQueryRecord'
        '400':
          description: Bad request/ invalid data
          content:
            application/json:
              schema:
                description: Any type
        '401':
          description: Unauthorized request.
          content:
            application/json:
              schema:
                description: Any type
        '500':
          description: Internal API Error
          content:
            application/json:
              schema:
                description: Any type
        '503':
          description: Database connection error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_:PayabliApiResponse'
servers:
  - url: https://api-sandbox.payabli.com/api
  - url: https://api.payabli.com/api
components:
  schemas:
    type_:OrganizationQueryRecordServicesItem:
      type: object
      properties:
        description:
          type: string
        enabled:
          type: boolean
        monthlyCost:
          type: number
          format: double
        name:
          type: string
        reseller:
          type: boolean
        setupCost:
          type: number
          format: double
        txCost:
          type: number
          format: double
        txPercentCost:
          type: number
          format: double
      title: OrganizationQueryRecordServicesItem
    type_:Achaccount:
      type: string
      description: Bank account number.
      title: Achaccount
    type_:Achrouting:
      type: string
      description: ABA/routing number of Bank account.
      title: Achrouting
    type_:BillingAddressNullable:
      type: string
      description: Billing address.
      title: BillingAddressNullable
    type_:BillingCityNullable:
      type: string
      description: Billing city.
      title: BillingCityNullable
    type_:BillingCountryNullable:
      type: string
      description: Billing address country.
      title: BillingCountryNullable
    type_:BillingStateNullable:
      type: string
      description: Billing state. Must be 2-letter state code for address in US.
      title: BillingStateNullable
    type_:BillingZip:
      type: string
      description: Billing address ZIP code.
      title: BillingZip
    type_:Instrument:
      type: object
      properties:
        achAccount:
          $ref: '#/components/schemas/type_:Achaccount'
        achRouting:
          $ref: '#/components/schemas/type_:Achrouting'
        billingAddress:
          $ref: '#/components/schemas/type_:BillingAddressNullable'
        billingCity:
          $ref: '#/components/schemas/type_:BillingCityNullable'
        billingCountry:
          $ref: '#/components/schemas/type_:BillingCountryNullable'
        billingState:
          $ref: '#/components/schemas/type_:BillingStateNullable'
        billingZip:
          $ref: '#/components/schemas/type_:BillingZip'
      required:
        - achAccount
        - achRouting
      title: Instrument
    type_:Email:
      type: string
      format: email
      description: Email address.
      title: Email
    type_:AdditionalDataString:
      type: string
      description: >-
        Custom dictionary of key:value pairs. You can use this field to store
        any data related to the object or for your system. Example usage: 


        ```json

        {
          "additionalData": {
            "key1": "value1",
            "key2": "value2",
            "key3": "value3"
          }
        }

        ```
      title: AdditionalDataString
    type_:Contacts:
      type: object
      properties:
        contactEmail:
          $ref: '#/components/schemas/type_:Email'
          description: Contact email address.
        contactName:
          type: string
          description: Contact name.
        contactPhone:
          type: string
          description: Contact phone number.
        contactTitle:
          type: string
          description: Contact title.
        additionalData:
          $ref: '#/components/schemas/type_:AdditionalDataString'
      title: Contacts
    type_:ContactsField:
      type: array
      items:
        $ref: '#/components/schemas/type_:Contacts'
      description: List of contacts.
      title: ContactsField
    type_:CreatedAt:
      type: string
      format: date-time
      description: Timestamp of when record was created, in UTC.
      title: CreatedAt
    type_:Orgid:
      type: integer
      format: int64
      description: Organization ID. Unique identifier assigned to an org by Payabli.
      title: Orgid
    type_:IsRoot:
      type: boolean
      description: When `true`, indicates that this is the organization's root template.
      title: IsRoot
    type_:Orgaddress:
      type: string
      description: The organization's address.
      title: Orgaddress
    type_:Orgcity:
      type: string
      description: The organization's city.
      title: Orgcity
    type_:Orgcountry:
      type: string
      description: The organization's country.
      title: Orgcountry
    type_:Orgentryname:
      type: string
      description: >-
        The entryname for the org, in string format. If you leave this blank,
        Payabli uses the DBA name.
      title: Orgentryname
    type_:Orgidstring:
      type: string
      description: >-
        An alternate ID for the organization, in string format. This can be your
        internal identifier for an org, and is typically a name, like "My
        Suborganization".
      title: Orgidstring
    type_:FileContentFtype:
      type: string
      enum:
        - pdf
        - doc
        - docx
        - jpg
        - jpeg
        - png
        - gif
        - txt
      description: The MIME type of the file (if content is provided)
      title: FileContentFtype
    type_:FileContent:
      type: object
      properties:
        fContent:
          type: string
          description: >-
            Content of file, Base64-encoded. Ignored if furl is specified. Max
            upload size is 30 MB.
        filename:
          type: string
          description: The name of the attached file.
        ftype:
          $ref: '#/components/schemas/type_:FileContentFtype'
          description: The MIME type of the file (if content is provided)
        furl:
          type: string
          description: Optional URL provided to show or download the file remotely
      description: Contains details about a file. Max upload size is 30 MB.
      title: FileContent
    type_:Orgname:
      type: string
      description: The name of the organization.
      title: Orgname
    type_:OrgParentId:
      type: integer
      format: int64
      description: The ID of the org's parent organization.
      title: OrgParentId
    type_:OrgParentName:
      type: string
      description: The name of the parent organization.
      title: OrgParentName
    type_:Orgstate:
      type: string
      description: The organization's state.
      title: Orgstate
    type_:Orgtimezone:
      type: integer
      description: The org's timezone, in UTC offset. For example, -5 is Eastern time.
      title: Orgtimezone
    type_:Orgtype:
      type: integer
      description: The organization type. Currently, this must be `0`.
      title: Orgtype
    type_:Orgwebsite:
      type: string
      description: The organization's website.
      title: Orgwebsite
    type_:Orgzip:
      type: string
      description: The organization's ZIP code.
      title: Orgzip
    type_:RecipientEmailNotification:
      type: boolean
      description: >-
        When `true`, Payabli will send the applicant a boarding link. Set this
        value to `false` if you are sending pre-filled applications via the API
        and don't want Payabli to send the applicant an email to complete the
        boarding application.
      title: RecipientEmailNotification
    type_:ReplyToEmail:
      type: string
      format: email
      description: >-
        Email address for organization-level communications, such as messages
        about why an application was declined. This is required by commerce laws
        in the US.
      title: ReplyToEmail
    type_:Resumable:
      type: boolean
      description: >-
        When `true`, the applicant can save an incomplete application and resume
        it later. When `false`, the applicant  won't have an option to save
        their progress, and must complete the application in one session.
      title: Resumable
    type_:SummaryOrg:
      type: object
      properties:
        amountSubs:
          type: number
          format: double
        amountTx:
          type: number
          format: double
        childOrgs:
          type: integer
        childPaypoints:
          type: integer
        countSubs:
          type: integer
        countTx:
          type: integer
      title: SummaryOrg
    type_:UsrAccess:
      type: object
      properties:
        roleLabel:
          type: string
        roleValue:
          type: boolean
      title: UsrAccess
    type_:Language:
      type: string
      description: >-
        The user's locale for PartnerHub and PayHub localization. Supported
        values: 
          - `en`
          - `es`
      title: Language
    type_:NameUser:
      type: string
      title: NameUser
    type_:PhoneNumber:
      type: string
      description: Phone number.
      title: PhoneNumber
    type_:OrgXScope:
      type: object
      properties:
        orgEntry:
          $ref: '#/components/schemas/type_:Orgentryname'
        orgId:
          $ref: '#/components/schemas/type_:Orgid'
        orgType:
          $ref: '#/components/schemas/type_:Orgtype'
      title: OrgXScope
    type_:Timezone:
      type: integer
      description: Timezone, in UTC offset. For example, -5 is Eastern time.
      title: Timezone
    type_:Mfa:
      type: boolean
      description: When `true`, multi-factor authentication (MFA) is enabled.
      title: Mfa
    type_:MfaMode:
      type: integer
      title: MfaMode
    type_:UsrStatus:
      type: integer
      description: "The user's status: \n  - Inactive:\t0\n  - Active:\t1\n  - Deleted:\t-99\n  - Locked:\t85"
      title: UsrStatus
    type_:UserQueryRecord:
      type: object
      properties:
        Access:
          type: array
          items:
            $ref: '#/components/schemas/type_:UsrAccess'
        AdditionalData:
          $ref: '#/components/schemas/type_:AdditionalDataString'
        createdAt:
          $ref: '#/components/schemas/type_:CreatedAt'
          description: The timestamp for the user's creation, in UTC.
        Email:
          $ref: '#/components/schemas/type_:Email'
          description: The user's email address.
        language:
          $ref: '#/components/schemas/type_:Language'
        lastAccess:
          type: string
          format: date-time
          description: The timestamp for the user's last activity, in UTC.
        Name:
          $ref: '#/components/schemas/type_:NameUser'
        Phone:
          $ref: '#/components/schemas/type_:PhoneNumber'
          description: The user's phone number.
        Scope:
          type: array
          items:
            $ref: '#/components/schemas/type_:OrgXScope'
        snData:
          type: string
          description: >-
            Additional data provided by the social network related to the
            customer.
        snIdentifier:
          type: string
          description: Identifier or token for customer in linked social network.
        snProvider:
          type: string
          description: >-
            Social network linked to customer. Possible values: facebook,
            google, twitter, microsoft.
        timeZone:
          $ref: '#/components/schemas/type_:Timezone'
        userId:
          type: integer
          format: int64
          description: The user's ID in Payabli.
        UsrMFA:
          $ref: '#/components/schemas/type_:Mfa'
        UsrMFAMode:
          $ref: '#/components/schemas/type_:MfaMode'
        UsrStatus:
          $ref: '#/components/schemas/type_:UsrStatus'
      title: UserQueryRecord
    type_:OrganizationQueryRecord:
      type: object
      properties:
        services:
          type: array
          items:
            $ref: '#/components/schemas/type_:OrganizationQueryRecordServicesItem'
        billingInfo:
          $ref: '#/components/schemas/type_:Instrument'
        contacts:
          $ref: '#/components/schemas/type_:ContactsField'
        createdAt:
          $ref: '#/components/schemas/type_:CreatedAt'
        hasBilling:
          type: boolean
        hasResidual:
          type: boolean
        idOrg:
          $ref: '#/components/schemas/type_:Orgid'
        isRoot:
          $ref: '#/components/schemas/type_:IsRoot'
        orgAddress:
          $ref: '#/components/schemas/type_:Orgaddress'
        orgCity:
          $ref: '#/components/schemas/type_:Orgcity'
        orgCountry:
          $ref: '#/components/schemas/type_:Orgcountry'
        orgEntryName:
          $ref: '#/components/schemas/type_:Orgentryname'
        orgId:
          $ref: '#/components/schemas/type_:Orgidstring'
        orgLogo:
          $ref: '#/components/schemas/type_:FileContent'
        orgName:
          $ref: '#/components/schemas/type_:Orgname'
        orgParentId:
          $ref: '#/components/schemas/type_:OrgParentId'
        orgParentName:
          $ref: '#/components/schemas/type_:OrgParentName'
        orgState:
          $ref: '#/components/schemas/type_:Orgstate'
        orgTimezone:
          $ref: '#/components/schemas/type_:Orgtimezone'
        orgType:
          $ref: '#/components/schemas/type_:Orgtype'
        orgWebsite:
          $ref: '#/components/schemas/type_:Orgwebsite'
        orgZip:
          $ref: '#/components/schemas/type_:Orgzip'
        recipientEmailNotification:
          $ref: '#/components/schemas/type_:RecipientEmailNotification'
        replyToEmail:
          $ref: '#/components/schemas/type_:ReplyToEmail'
        resumable:
          $ref: '#/components/schemas/type_:Resumable'
        summary:
          $ref: '#/components/schemas/type_:SummaryOrg'
        users:
          type: array
          items:
            $ref: '#/components/schemas/type_:UserQueryRecord'
      title: OrganizationQueryRecord
    type_:IsSuccess:
      type: boolean
      description: >-
        Boolean indicating whether the operation was successful. A `true` value
        indicates success. A `false` value indicates failure.
      title: IsSuccess
    type_:Responsedata:
      type: object
      additionalProperties:
        description: Any type
      description: The object containing the response data.
      title: Responsedata
    type_:ResponseText:
      type: string
      description: 'Response text for operation: ''Success'' or ''Declined''.'
      title: ResponseText
    type_:PayabliApiResponse:
      type: object
      properties:
        isSuccess:
          $ref: '#/components/schemas/type_:IsSuccess'
        responseData:
          $ref: '#/components/schemas/type_:Responsedata'
        responseText:
          $ref: '#/components/schemas/type_:ResponseText'
      required:
        - responseText
      title: PayabliApiResponse
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: requestToken

```

## SDK Code Examples

```typescript
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        apiKey: "YOUR_API_KEY_HERE",
    });
    await client.organization.getOrganization(123);
}
main();

```

```python
from payabli import payabli

client = payabli(
    api_key="YOUR_API_KEY_HERE",
)

client.organization.get_organization(
    org_id=123,
)

```

```csharp
using PayabliPayabliApi;
using System.Threading.Tasks;

namespace Usage;

public class Example
{
    public async Task Do() {
        var client = new PayabliPayabliApiClient(
            apiKey: "YOUR_API_KEY_HERE"
        );

        await client.Organization.GetOrganizationAsync(
            123
        );
    }

}

```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api-sandbox.payabli.com/api/Organization/read/123"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("requestToken", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/Organization/read/123")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["requestToken"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api-sandbox.payabli.com/api/Organization/read/123")
  .header("requestToken", "<apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api-sandbox.payabli.com/api/Organization/read/123', [
  'headers' => [
    'requestToken' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```swift
import Foundation

let headers = ["requestToken": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/Organization/read/123")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```