{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[]},"params":[],"examples":{"codes":[]},"method":"post"},"next":{"description":"","pages":[]},"title":"Create Custom Report","type":"endpoint","slug":"create-custom-report","excerpt":"","body":"## Definition\nhttps<span>://sandbox.bluesnap.com/services/2/report/dynamic-def</span>\n\n<hr>\n\n## Documentation\nThis request allows you to select a [report category](doc:report-categories) and specify which of its columns to include in order to create your own custom report. \n\n**Note:** You can have up to 50 custom reports saved at one time. \n\n### Request Content\nSend a **[customReport](doc:custom-report-object)** object, with the following: \n\n `title` *string* <span style=\"color:#F37500\">**required**</span>\n `info` *string* optional\n `category` *string* <span style=\"color:#F37500\">**required**</span>\n `columns` *array* <span style=\"color:#F37500\">**required**</span>\n\n### Response Details \nIf successful, the response HTTP status code is 200 OK.\nThe response contains the request properties plus an `id` property, which is need when you manage or run the report in the future. \n\n<hr>\n\n## Examples \n### Request Examples \n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/report/dynamic-def \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n \\\"category\\\": \\\"TransactionCategory\\\",\\n \\\"title\\\": \\\"My custom transaction report\\\",\\n \\\"columns\\\": [\\n {\\\"name\\\": \\\"Merchant Sales (Auth Currency)\\\"},\\n {\\\"name\\\": \\\"Auth. Currency\\\"},\\n {\\\"name\\\": \\\"Merchant Transaction ID\\\"},\\n {\\\"name\\\": \\\"Transaction Date\\\"},\\n {\\\"name\\\": \\\"Transaction Type\\\"}\\n ]\\n}'\",\n \"language\": \"curl\",\n \"name\": \"Create Custom Report: based on transaction data\"\n },\n {\n \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/report/dynamic-def \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n \\\"category\\\": \\\"PayoutCategory\\\",\\n \\\"title\\\": \\\"My custom payout report\\\",\\n \\\"columns\\\": [\\n {\\\"name\\\": \\\"Merchant Transaction ID\\\"},\\n {\\\"name\\\": \\\"Transaction Amount\\\"},\\n {\\\"name\\\": \\\"Transaction Currency\\\"},\\n {\\\"name\\\": \\\"Gross Payout Amount\\\"},\\n {\\\"name\\\": \\\"Payment ID\\\"}\\n ]\\n}'\",\n \"language\": \"curl\",\n \"name\": \"based on payout data\"\n }\n ]\n}\n[/block]\n### Reponse Examples\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"{\\n \\\"id\\\": 7637,\\n \\\"category\\\": \\\"TransactionCategory\\\",\\n \\\"title\\\": \\\"My custom transaction report\\\",\\n \\\"columns\\\": [\\n {\\n \\\"name\\\": \\\"Merchant Sales (Auth Currency)\\\"\\n },\\n {\\n \\\"name\\\": \\\"Auth. Currency\\\"\\n },\\n {\\n \\\"name\\\": \\\"Merchant Transaction ID\\\"\\n },\\n {\\n \\\"name\\\": \\\"Transaction Date\\\"\\n },\\n {\\n \\\"name\\\": \\\"Transaction Type\\\"\\n }\\n ]\\n}\",\n \"language\": \"json\",\n \"name\": \"Based on transaction data\"\n },\n {\n \"code\": \"{\\n \\\"id\\\": 7641,\\n \\\"category\\\": \\\"PayoutCategory\\\",\\n \\\"title\\\": \\\"My custom payout report\\\",\\n \\\"columns\\\": [\\n {\\n \\\"name\\\": \\\"Merchant Transaction ID\\\"\\n },\\n {\\n \\\"name\\\": \\\"Transaction Amount\\\"\\n },\\n {\\n \\\"name\\\": \\\"Transaction Currency\\\"\\n },\\n {\\n \\\"name\\\": \\\"Gross Payout Amount\\\"\\n },\\n {\\n \\\"name\\\": \\\"Payment ID\\\"\\n }\\n ]\\n}\",\n \"language\": \"json\",\n \"name\": \"based on payout data\"\n }\n ]\n}\n[/block]\n<hr>\n\n## Example Descriptions\n\nFor details about the above examples, see: \n\n* [Create Custom Report based on transaction data](#section-create-custom-report-based-on-transaction-data)\n* [Create Custom Report based on payout data](#section-create-custom-report-based-on-payout-data)\n\n## Create Custom Report based on transaction data\nThis request shows how to create a report based on your transaction data. For the `category` parameter, pass **TransactionCategory** and specify which columns to include in the report in the `columns` array. Click [here](https://support.bluesnap.com/docs/transaction-category#available-columns) for a list of available columns. \n\n## Create Custom Report based on payout data\nThis request shows how to create a report based on your payout data. For the `category` parameter, pass **PayoutCategory** and specify which columns to include in the report in the `columns` array. Click [here](https://support.bluesnap.com/docs/payout-category#available-columns) for a list of available columns.","updates":[],"order":1,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"6197defc41c8040154bcbac6","createdAt":"2020-11-03T16:50:11.586Z","user":"5ea72d649148ff00653f6bbc","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Custom Reporting API","slug":"dynamic-reporting-api","order":2,"from_sync":false,"reference":false,"_id":"6197defc41c8040154bcba72","createdAt":"2020-11-03T16:46:14.694Z","version":"6197defc41c8040154bcbaea","project":"57336fd5a6a9c40e00e13a0b","__v":0},"version":{"version":"8976-Tools","version_clean":"8976.0.0-Tools","codename":"3.40 Release","is_stable":false,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["6197defc41c8040154bcba61","6197defc41c8040154bcba62","6197defc41c8040154bcba63","6197defc41c8040154bcba64","6197defc41c8040154bcba65","6197defc41c8040154bcba66","6197defc41c8040154bcba67","6197defc41c8040154bcba68","6197defc41c8040154bcba69","6197defc41c8040154bcba6a","6197defc41c8040154bcba6b","6197defc41c8040154bcba6c","5b34c737e0dca2000311de6a","60957f4cce403c0045a031ef","6197defc41c8040154bcba6d","6197defc41c8040154bcba6e","6197defc41c8040154bcba6f","6197defc41c8040154bcba70","6197defc41c8040154bcba71","6197defc41c8040154bcba72"],"_id":"6197defc41c8040154bcbaea","project":"57336fd5a6a9c40e00e13a0b","__v":0,"forked_from":"60957f4cce403c0045a03255","createdAt":"2018-04-23T15:17:35.680Z","releaseDate":"2018-04-23T15:17:35.680Z"},"project":"57336fd5a6a9c40e00e13a0b","__v":0,"parentDoc":null}
postCreate Custom Report
Definition
https://sandbox.bluesnap.com/services/2/report/dynamic-def
Documentation
This request allows you to select a report category and specify which of its columns to include in order to create your own custom report.
Note: You can have up to 50 custom reports saved at one time.
Request Content
Send a customReport object, with the following:
title
string required
info
string optional
category
string required
columns
array required
Response Details
If successful, the response HTTP status code is 200 OK.
The response contains the request properties plus an id
property, which is need when you manage or run the report in the future.
Examples
Request Examples
curl -v -X POST https://sandbox.bluesnap.com/services/2/report/dynamic-def \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"category": "TransactionCategory",
"title": "My custom transaction report",
"columns": [
{"name": "Merchant Sales (Auth Currency)"},
{"name": "Auth. Currency"},
{"name": "Merchant Transaction ID"},
{"name": "Transaction Date"},
{"name": "Transaction Type"}
]
}'
curl -v -X POST https://sandbox.bluesnap.com/services/2/report/dynamic-def \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"category": "PayoutCategory",
"title": "My custom payout report",
"columns": [
{"name": "Merchant Transaction ID"},
{"name": "Transaction Amount"},
{"name": "Transaction Currency"},
{"name": "Gross Payout Amount"},
{"name": "Payment ID"}
]
}'
{
"id": 7637,
"category": "TransactionCategory",
"title": "My custom transaction report",
"columns": [
{
"name": "Merchant Sales (Auth Currency)"
},
{
"name": "Auth. Currency"
},
{
"name": "Merchant Transaction ID"
},
{
"name": "Transaction Date"
},
{
"name": "Transaction Type"
}
]
}
{
"id": 7641,
"category": "PayoutCategory",
"title": "My custom payout report",
"columns": [
{
"name": "Merchant Transaction ID"
},
{
"name": "Transaction Amount"
},
{
"name": "Transaction Currency"
},
{
"name": "Gross Payout Amount"
},
{
"name": "Payment ID"
}
]
}
Example Descriptions
For details about the above examples, see:
Create Custom Report based on transaction data
This request shows how to create a report based on your transaction data. For the category
parameter, pass TransactionCategory and specify which columns to include in the report in the columns
array. Click here for a list of available columns.
Create Custom Report based on payout data
This request shows how to create a report based on your payout data. For the category
parameter, pass PayoutCategory and specify which columns to include in the report in the columns
array. Click here for a list of available columns.