Skip to content

Instantly share code, notes, and snippets.

@AndrewHenderson
Last active October 31, 2015 00:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndrewHenderson/8ecf5782568c0568291f to your computer and use it in GitHub Desktop.
Save AndrewHenderson/8ecf5782568c0568291f to your computer and use it in GitHub Desktop.
PATCH /preapprovallinitems/1
{
"data": {
"type": "preapprovallinitems",
"id": "1",
"attributes": {
"name": "Updated Report"
}
},
"included": [{
"type": "preapprovallineitemudas",
"id": "9",
"attributes": {
"stringValue": "LAX/JFK"
}
}]
}
RESPONSE
{
"data": {
"relationships": {
"preapprovallineitems": {
"data": [
{
"type": "preapprovallineitemudas",
"id": "9"
},
{
"type": "preapprovallineitemudas",
"id": "11"
}
]
}
}
},
"included": [{
"type": "preapprovallineitemudas",
"id": "11"
}]
}
PATCH /preapprovallinitems/1
{
"data": {
"type": "preapprovallinitems",
"id": "1",
"attributes": {
"preapprovallineitemudas": [
{
"id": "9",
"stringValue": "LAX/JFK",
},
{
"id": "14",
"entityId": "1331",
}
]
}
}
}
RESPONSE
{
"data": {
"type": "preapprovallinitems",
"id": "1",
"attributes": {
"preapprovaludas": [
{
"id": "9",
"stringValue": "LAX/JFK",
},
{
"id": "11",
"stringValue": "",
}
]
}
}
}
PATCH /preapprovallinitems/1/preapprovaludas/9
{
"data": {
"type": "preapprovaludas",
"id": "9",
"attributes": {
"entityId": "1888",
}
}
}
RESPONSE (This response object refers another UDA being used by the preapprovallineitem)
{
"included": [{
"type": "preapprovaludas",
"id": "11",
"attributes": {
"entityId": "1331",
}
}]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment