POST /api/v1/vendors/:vendor_api_token/users/:user_id/recipients
VENDORS: Create a new recipient for a user belonging to a VENDOR partner.

Initiate a new money transfer by first creating a recipient. You may optionally supply a remittance hash to automatically build a remittance associated with this new recipient.

Generally, you want to reuse recipient records whenever you can, as this allows us to build a transaction history for a given person. However, there are plenty of instances when simply creating a new recipient record would be more appropriate, even when it pertains to the previously-created record and email address. (An example would be if the recipient is in a different province, which means that we would need to calculate a different service fee for him/her anyway.)

Supported Formats

json

Examples

{
  "recipient": {
    "id": 1,
    "user_id": 1,
    "first_name": "First",
    "middle_name": null,
    "last_name": "Last",
    "email": null,
    "mobile": "0917xxxxxxx",
    "address": null,
    "city": null,
    "province": null,
    "postal_code": null,
    "created_at": "2016-05-04T11:34:14.096+08:00",
    "updated_at": "2016-05-04T11:34:14.096+08:00",
    "deleted_at": null,
    "created_via_api": true,
    "deleted": false,
    "business_name": null,
    "business_slug": null,
    "is_test": false
  }
}

Params

Param name Description
recipient
required

Recipient Information

Validations:

  • Must be a Hash

recipient[first_name]
required

Validations:

  • Must be a String

recipient[last_name]
required

Validations:

  • Must be a String

recipient[mobile]
required

Validations:

  • Must be a String

recipient[email]
optional

Validations:

  • Must be a String

recipient[address]
optional

Validations:

  • Must be a String

recipient[city]
optional

Validations:

  • Must be a String

recipient[province]
optional

Validations:

  • Must be a String

recipient[postal_code]
optional

Validations:

  • Must be a String


GET /api/v1/vendors/:vendor_api_token/users/:user_id/recipients
VENDORS: List all recipients for a user belonging to a VENDOR partner.

List all recipients associated with the current user, paginated via [:page] parameter. Note that there are no uniqueness checks for recipient names, emails, or mobiles, so you will need to build your own methods for organizing them.

Supported Formats

json

Examples

[
  {
    "id": 1,
    "first_name": "Test",
    "last_name": "User",
    "mobile": "123123123",
    "email": "test@example.com",
    "created_at": "2016-05-03T10:32:54.832+08:00"
  },
  {
    "id": 2,
    "first_name": "Juan",
    "last_name": "dela Cruz",
    "mobile": "123123123",
    "email": "juan@delacruz.com",
    "created_at": "2016-05-03T10:32:54.832+08:00"
  }
]

GET /api/v1/vendors/:vendor_api_token/users/:user_id/recipients/:id
VENDORS: Show details about a recipient of a given user, and their associated remittance IDs

Returns Recipient information

Supported Formats

json

Examples

{
  "recipient": {
    "id": 1,
    "user_id": 1,
    "first_name": "First",
    "middle_name": null,
    "last_name": "Last",
    "email": null,
    "mobile": "0917xxxxxxx",
    "address": null,
    "city": null,
    "province": null,
    "postal_code": null,
    "created_at": "2016-05-04T11:34:14.096+08:00",
    "updated_at": "2016-05-04T11:34:14.096+08:00",
    "deleted_at": null,
    "created_via_api": true,
    "deleted": false,
    "business_name": null,
    "business_slug": null,
    "is_test": false
  },
  "remittance_ids": [
    1,
    2,
    3
  ]
}

Params

Param name Description
id
required

Recipient ID (Integer > 0)

Validations:

  • Must be a String


PUT /api/v1/vendors/:vendor_api_token/users/:user_id/recipients/:id
VENDORS: Update the attributes of a recipient of a user belonging to a VENDOR partner.

Supported Formats

json

Examples

{
  "recipient": {
    "id": 1,
    "user_id": 1,
    "first_name": "First",
    "middle_name": null,
    "last_name": "Last",
    "email": null,
    "mobile": "0917xxxxxxx",
    "address": null,
    "city": null,
    "province": null,
    "postal_code": null,
    "created_at": "2016-05-04T11:34:14.096+08:00",
    "updated_at": "2016-05-04T11:34:14.096+08:00",
    "deleted_at": null,
    "created_via_api": true,
    "deleted": false,
    "business_name": null,
    "business_slug": null,
    "is_test": false
  },
  "remittance_ids": [
    1,
    2,
    3
  ]
}

Params

Param name Description
recipient
required

Recipient Information

Validations:

  • Must be a Hash

recipient[first_name]
required

Validations:

  • Must be a String

recipient[last_name]
required

Validations:

  • Must be a String

recipient[mobile]
required

Validations:

  • Must be a String

recipient[email]
optional

Validations:

  • Must be a String

recipient[address]
optional

Validations:

  • Must be a String

recipient[city]
optional

Validations:

  • Must be a String

recipient[province]
optional

Validations:

  • Must be a String

recipient[postal_code]
optional

Validations:

  • Must be a String


DELETE /api/v1/vendors/:vendor_api_token/users/:user_id/recipients/:id
VENDORS: Delete recipient record of a user belonging to a VENDOR partner safely

Safely delete a recipient.

Params

Param name Description
id
required

Validations:

  • Must be a String