create new entry
POST /api/rest/admin/payments
Parameters
Name |
Description |
data[type]
|
Resource type (payments)
|
data[attributes][amount]
|
Amount
|
data[attributes][notes]
|
Notes
|
data[relationships][account]
|
Account
|
Request
Headers
Route
POST /api/rest/admin/payments
Body
{"data":{"type":"payments","attributes":{"amount":10},"relationships":{"account":{"data":{"type":"accounts","id":83}}}}}
Response
Headers
Status
201 Created
Body
{
"data": {
"id": "34",
"type": "payments",
"links": {
"self": "http://example.org/api/rest/admin/payments/34"
},
"attributes": {
"amount": "10.0",
"notes": null,
"status": "completed",
"type-name": "manual"
},
"relationships": {
"account": {
"links": {
"self": "http://example.org/api/rest/admin/payments/34/relationships/account",
"related": "http://example.org/api/rest/admin/payments/34/account"
},
"data": {
"type": "accounts",
"id": "83"
}
}
}
}
}