Skip to content

Create a new vendor

Request

Security
oauth2ClientCredentials(Required scopes: vendors:write)
Headers
org_wallet_refstring

Organization wallet reference, defaults to "1" if not provided

business_idstringrequired

Business identifier for the request

Bodyapplication/jsonrequired
phonestringrequired

Vendor phone number

Example:712345678
emailstring

Vendor email address

Example:"vendor@example.com"
contact_namestringrequired

Contact person name

Example:"John Doe"
company_namestringrequired

Company name

Example:"Acme Corporation"
addressstring

Company address

Example:"P.O. Box 12345, Nairobi"
descriptionstring

Vendor description

Example:"Office supplies vendor"
statusstring

Vendor status

Enum:"ACTIVE""INACTIVE""ARCHIVED"
Example:"ACTIVE"
payment_instructionsArray of objects(CreatePaymentInstructionV1Dto)required

Payment instructions array (at least one required)

taxIDstring

Tax identification number

Example:"P051234567X"
read_onlyboolean

Whether vendor is read-only

Example:false
externalIdstring

External system ID

Example:"12345"
curl -i -X POST \
  https://developer.boyahq.com/_mock/v2/openapi/vendors \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'business_id: string' \
  -H 'org_wallet_ref: string' \
  -d '{
    "phone": 712345678,
    "email": "vendor@example.com",
    "contact_name": "John Doe",
    "company_name": "Acme Corporation",
    "address": "P.O. Box 12345, Nairobi",
    "description": "Office supplies vendor",
    "status": "ACTIVE",
    "payment_instructions": [
      {
        "_id": "string",
        "channel": "bank",
        "phone": 712345678,
        "accno": "1234567890",
        "bank": "BANK OF AFRICA K LTD",
        "bank_code": "19",
        "bankCode": "19",
        "till": "123456",
        "till_no": "123456",
        "business_no": "247247",
        "is_default": true
      }
    ],
    "taxID": "P051234567X",
    "read_only": false,
    "externalId": "12345"
  }'

Responses

Vendor created successfully

Bodyapplication/json
_idstring

Vendor MongoDB ID

phonestring

Vendor phone number

emailstring

Vendor email address

contact_namestring

Contact person name

company_namestring

Company name

addressstring

Company address

descriptionstring

Vendor description

statusstring

Vendor status

Enum:"ACTIVE""INACTIVE""ARCHIVED"
payment_instructionsArray of objects(PaymentInstructionV1Dto)

Payment instructions array

taxIDstring

Tax identification number

read_onlyboolean

Whether vendor is read-only

externalIdstring

External system ID

createdAtstring

Created timestamp

updatedAtstring

Updated timestamp

__vnumber

Version key

Response
{ "_id": "string", "phone": "string", "email": "string", "contact_name": "string", "company_name": "string", "address": "string", "description": "string", "status": "ACTIVE", "payment_instructions": [ {} ], "taxID": "string", "read_only": true, "externalId": "string", "createdAt": "string", "updatedAt": "string", "__v": 0 }