POST exchange-office-ratings/create-by-partner

Creates a new Exchange Office Rating owned by the currently authenticated exchange office. Requires a JSON POST body and Content-Type header to be set to application/json. Setting Content-Length may also be required if it is not automatically.

URL

https://unicash.io/api/exchange-office-ratings/create-by-partner

Parameters

access-token (string) (required) (header param) Access token for exchange office authentication.
pair (string) (required) The id of the Exchange Office Currency Pair used in transaction. For example: euruxc
ps (string) (required) The id of the Exchange Office Currency Pair used in transaction. For example: bank
id_transaction (int) (required) The id of the completed transaction from exchange office system.
name (string) (required) The name of the user who performed the transaction.
email (string) (required) The email of the user who performed the transaction.
rating (int) (required) Rating value. Valid values are: 1, 2, 3, 4, 5.
type (int) (required) Type of rating. 0 for negative, 1 for positive.
amount (double) (required) Amount of currency.
text (string) (optional) Text of user for rating. This field is required when type is 0 (negative)
wallet_number (int) (optional) Wallet number of the user who performed the transaction.

Example request

{
    "id": 1,
    "pair": "euruxc",
    "ps": "bank",
    "id_transaction": 25993926,
    "name": "Abagael Sutherland",
    "email": "abagael.sutherland@gmail.com",
    "rating": 3,
    "text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit suspendisse.",
    "type": 0,
    "amount": 7845,
    "wallet_number": 16632372
}

Example success response

{
    "status": 200,
    "data": {
        "id": 1,
        "id_exchange_office_currency_pair": 1,
        "id_transaction": 25993926,
        "name": "Abagael Sutherland",
        "email": "abagael.sutherland@gmail.com",
        "rating": 3,
        "text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit suspendisse.",
        "type": 0,
        "amount": 7845,
        "wallet_number": 16632372,
        "created_at": 1512124200,
        "updated_at": 1512124200
    }
}

Example error response

{
    "status": 400,
    "error": "This is an error message."
}