Skip to main content
POST
/
partners
Create organization partner
curl --request POST \
  --url https://api.mycreditapp.ai/v1-beta/partners \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Requester-Organization-ID: <requester-organization-id>' \
  --header 'Target-Organization-ID: <target-organization-id>' \
  --data '
{
  "company_name": "<string>",
  "sales_amount": 1073741823,
  "partner_type": "customer",
  "email": "jsmith@example.com",
  "frequency": "<string>",
  "payment_terms": "<string>",
  "address": "<string>",
  "city": "<string>",
  "state": "<string>",
  "postal_code": "<string>",
  "country_code": "<string>",
  "company_registration_number": "<string>"
}
'
{
  "company_name": "<string>",
  "sales_amount": 1073741823,
  "partner_type": "customer",
  "email": "jsmith@example.com",
  "frequency": "<string>",
  "payment_terms": "<string>",
  "address": "<string>",
  "city": "<string>",
  "state": "<string>",
  "postal_code": "<string>",
  "country_code": "<string>",
  "company_registration_number": "<string>",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "invitation_status": "invited",
  "guest_organization_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}

Authorizations

Authorization
string
header
required

Bearer authentication using a JWT token. Provide a valid access token. Authorization header format: Authorization: Bearer <token>.

Headers

Requester-Organization-ID
string<uuid>
required

The unique identifier of the organization making the request. This ID is used to authorize the requester within the system.

Example:

"054b4106-174b-46b0-97f8-86d8d7b6f0af"

Target-Organization-ID
string<uuid>
required

The unique identifier of the organization that is the target of the request. The Target-Organization-ID may match the Requester-Organization-ID if the requester accesses their own resources. If the Target-Organization-ID differs from the Requester-Organization-ID, the requester can access third-party resources if the requester has a connection with the target organization and is authorized to perform such actions.

Example:

"123e4567-e89b-12d3-a456-426614174000"

Body

application/json
company_name
string
required

Name of the partner company

Required string length: 1 - 100
Examples:

"Example Supplies Ltd"

"Example Trade Group"

sales_amount
integer
required

Annual sales amount with this partner

Required range: 0 <= x <= 2147483647
Examples:

150000

2500000

partner_type
enum<string>
required

Type of organization partner

Available options:
customer,
supplier
email
string<email>
required

Contact email address of the partner

Required string length: 1 - 100
Examples:

"partner@example.com"

"contact@exampletrade.io"

frequency
string
required

Frequency of transactions with the partner

Required string length: 1 - 30
payment_terms
string
required

Payment terms agreed with the partner

Required string length: 1 - 50
Examples:

"Net 30"

"Net 60"

address
string
required

Valid organization partner's street address

Required string length: 1 - 500
Examples:

"123 Main St, Suite 400"

"456 Elm St, Floor 2"

city
string
required

Valid organization partner's city

Required string length: 1 - 100
Examples:

"New York"

"San Francisco"

state
string
required

Valid organization partner's state or province

Required string length: 1 - 100
Examples:

"NY"

"CA"

postal_code
string
required

Valid organization partner's postal code

Required string length: 1 - 30
Example:

12345

country_code
string
required

Valid organization partner's country code in ISO 3166-1 alpha-2

Required string length: 2
Examples:

"US"

"CA"

company_registration_number
string
required

Valid organization partner's company registration number

Required string length: 1 - 255
Examples:

"123456789"

"987654321"

Response

Successful Response

company_name
string
required

Name of the partner company

Required string length: 1 - 100
Examples:

"Example Supplies Ltd"

"Example Trade Group"

sales_amount
integer
required

Annual sales amount with this partner

Required range: 0 <= x <= 2147483647
Examples:

150000

2500000

partner_type
enum<string>
required

Type of organization partner

Available options:
customer,
supplier
email
string<email>
required

Contact email address of the partner

Required string length: 1 - 100
Examples:

"partner@example.com"

"contact@exampletrade.io"

frequency
string
required

Frequency of transactions with the partner

Required string length: 1 - 30
payment_terms
string
required

Payment terms agreed with the partner

Required string length: 1 - 50
Examples:

"Net 30"

"Net 60"

address
string
required

Valid organization partner's street address

Required string length: 1 - 500
Examples:

"123 Main St, Suite 400"

"456 Elm St, Floor 2"

city
string
required

Valid organization partner's city

Required string length: 1 - 100
Examples:

"New York"

"San Francisco"

state
string
required

Valid organization partner's state or province

Required string length: 1 - 100
Examples:

"NY"

"CA"

postal_code
string
required

Valid organization partner's postal code

Required string length: 1 - 30
Example:

12345

country_code
string
required

Valid organization partner's country code in ISO 3166-1 alpha-2

Required string length: 2
Examples:

"US"

"CA"

company_registration_number
string
required

Valid organization partner's company registration number

Required string length: 1 - 255
Examples:

"123456789"

"987654321"

id
string<uuid>
required

Unique identifier of the organization partner

Example:

"550e8400-e29b-41d4-a716-446655440000"

created_at
string<date-time>
required

Timestamp when the partner record was created

Example:

"2024-01-10T12:00:00.123456"

updated_at
string<date-time>
required

Timestamp when the partner record was last updated

Example:

"2024-02-15T09:30:00.123456"

invitation_status
enum<string> | null

Current invitation status of the partner

Available options:
invited,
accepted
guest_organization_id
string<uuid> | null

Identifier of the guest organization if the partner accepted the invitation

Example:

"3fa85f64-5717-4562-b3fc-2c963f66afa6"