(Quick Reference) Service: Show a prepayment

Description: Returns the requested operation in json format when successful. Returns a json response, describing the failure condition when unsuccessful.

URL:

https://BASE_URL/api/VERSION/orderPrepayments/{id}

URL with external_id:

https://BASE_URL/api/VERSION/orderPrepayments/reference/{id}

Method: GET

Parameters:

NameDescriptionTypeRequiredExample values
idThe ID of the desired prepaymentLong/Stringyes123

Success Output

Success case: response.status = 200

{
 "id": 27,
 "reference": "L-aa-1505226514088",
  "description": "",
  "total": 45,
  "paymentDate": "2017-09-12T08:25:00Z",
  "dateCreated": "2017-09-12T14:28:49Z",
  "lastUpdated": "2017-09-12T14:28:49Z",
  "status": "UNAPPLIED",
  "currency": "AUD",
  "paymentType": {
    "id": 4,
    "reference": "CASH",
    "name": "Cash",
    "href": "/valomniav2/api/v2.1/paymentTypes/4"
  },
  "bank": null,
  "chequeNumber": null,
  "desiredPaymentDate": null,
  "organization": "entity1",
  "createdBy": {
    "userId": 2,
    "reference": "emp-002",
    "href": "/valomniav2/api/v2.1/users/2"
  },
  "customer": {
    "id": 1,
    "reference": "JohnDoe",
    "reference2": "",
    "name": "John Doe",
    "href": "/valomniav2/api/v2.1/customers/1"
  }
}

Failure Output

Failure case:response.status = 400
{
  "error": "invalid_param_type",
  "error_description": "The type of parameter id you provided is not valid for this request."
}

Failure case:response.status = 404

{
  "error": "not_found",
  "error_description": "The order with the id 7065 doesn't exist."
}