Skip to content

Instantly share code, notes, and snippets.

@AndrewHenderson
Last active November 10, 2015 18:42
Show Gist options
  • Save AndrewHenderson/e284affd0f7772dee5bf to your computer and use it in GitHub Desktop.
Save AndrewHenderson/e284affd0f7772dee5bf to your computer and use it in GitHub Desktop.
POST preapprovalsummaries
{
data: {
type: 'preapprovalsummaries',
attributes: {
expenseReportId: 1,
preApprovalId: 2
}
}
}
RESPONSE
{
data: {
type: 'preapprovalsummaries',
id: 1-2,
attributes: {
expenseReportId: 1,
preApprovalId: 2,
foo: 'bar'
}
}
}
@AndrewHenderson
Copy link
Author

@jmeas This is an endpoint for a preview resource when applying a Pre-Approval to an Expense Report. So it's a mutated resource that is never saved in the database.

GET didn't work quite to spec. This is one example we discussed.

We decided on the above after considering several alternatives.

Note: There would be more data than the single foo: "bar" pair of course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment