- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Email to a Friend
- Printer Friendly Page
- Report Inappropriate Content
Include "CreatedDate" and "UpdatedDate" Fields in REST GET Call that Queries Objects
We are using GET Transaction Invoice (GET /v1/transactions/invoices/accounts/{account-key}) and want to compare that to unbilled Orders, to calculate unbilled amount for multiple Orders on one Subscription (since GET Order Billing Info only supports unbilled amount for a single order).
The InvoiceDate that is returned from GET /v1/transactions/invoices/accounts/{account-key} is not dateTime, so we cannot easily compare it to the Order date, which is dateTime, to see if the Invoice or Order was created first.
To work around, we are going to use Action Query (POST /v1/action/query) or CRUD Get Invoice (GET /v1/object/invoice/{id}) to get the CreatedDate of Invoice if the invoiceDate and orderDate are the same day, since CreatedDate is a dateTime that we can compare to the orderDate.
We request that CreatedDate and UpdatedDate be returned for any GET API call that is a query for an object, but especially GET /v1/transactions/invoices/accounts/{account-key} so that these secondary calls are not needed.
- Find more ideas tagged with:
- API
- Created Date
- invoice date
- Order date
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.