Create Buyer

​

Create a buyer record with company and contact information

Headers

  • Optional client-generated UUID used to correlate this request with support and logs.

Body·

required
application/json

V1 create buyer request.

V1 sends { buyers: [{ buyer objects }] }. The proxy transforms address fields and forwards to V2.

  • The buyers value.

    Properties: 16

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/buyer
curl https://ar.jomeinvoice.my/api/buyer \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "buyers": [
    {
      "address_city": "Kuala Lumpur",
      "address_country": "MYS",
      "address_line0": "123 Main Street",
      "address_line1": "Level 2",
      "address_line2": "Suite 201",
      "address_postal_code": "50000",
      "address_state": "14",
      "cif_number": "CIF123456",
      "contact_number": "+60123456789",
      "email": "buyer@example.com",
      "name": "Buyer Company",
      "office_contact": "+60123456789",
      "registration_document_type": "BRN",
      "registration_number": "12345678",
      "sst": "SST123456",
      "tin": "123456789"
    }
  ]
}'
{
  "data": {
    "accepted_buyers": [
      {
        "buyer_uuid": "123e4567-e89b-12d3-a456-426614174000",
        "message": "Buyer created or updated successfully."
      }
    ],
    "rejected_buyers": [
      {
        "email": "invalid@example.com",
        "message": "Validation failed: Buyer TIN is not verified according to LHDN"
      }
    ],
    "status": "success"
  },
  "message": "Buyer Request Submitted.",
  "requestId": "123e4567-e89b-12d3-a456-426614174000",
  "status": "success"
}