Last active
October 31, 2015 00:16
-
-
Save AndrewHenderson/8ecf5782568c0568291f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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