Skip to main content

Example: ReportTime data object

{
  "CustomDateRangeEnd": {
    "Day": IntValueHere,
    "Month": IntValueHere,
    "Year": IntValueHere
  },
  "CustomDateRangeStart": {
    "Day": IntValueHere,
    "Month": IntValueHere,
    "Year": IntValueHere
  },
  "PredefinedTime": "ValueHere",
  "ReportTimeZone": "ValueHere"
}

 

Error I am getting:

The app returned "The specified report time is invalid. Please submit a report request with a time type that contains exactly one of PredefinedTime, CustomDates, CustomDateRangeStart/End, and null for the rest.".

 

  1. What is the “CustomDates” - it is not shown in the sample
  1. When I try to set the PredefinedTime to a null value.

 

 const jsonNull = {
  nullValue: ""
};
// Set the property to null
jsonNull.nullValue = null;

 

body {

     …...

    "Aggregation": "Daily",
    "Columns": a
      "AccountName",
      "Conversions" 
    ],
    "Filter": {
    "AccountStatus": "Active"
    },
    "Scope": {
      "AccountIds":
        "{{bundle.inputData.account_id}}"
      ]
    },
    "Time": {
      "CustomDateRangeEnd": {
        "Day": 5,
        "Month": 11,
        "Year": 2024
      },
      "CustomDateRangeStart": {
        "Day": 5,
        "Month": 11,
        "Year": 2024
      },
      "PredefinedTime": jsonNull.nullValue,
      "ReportTimeZone": "CentralTimeUSCanada"
    }

 

it doesn’t seem that the null is flowing through.. is there a setting somewhere to allow nulls?

 

 

 

The app returned "The specified report time is invalid. Please submit a report request with a time type that contains exactly one of PredefinedTime, CustomDates, CustomDateRangeStart/End, and null for the rest.". What happened (You are seeing this because you are an admin): Stack trace: ResponseError: {"status":400,"headers":{"content-type":"application/json; charset=utf-8","retry-after":null},"content":"{\"OperationErrors\":u{\"Code\":2008,\"ErrorCode\":\"InvalidReportTimeSelection\",\"Details\":null,\"Message\":\"The specified report time is invalid. Please submit a report request with a time type that contains exactly one of PredefinedTime, CustomDates, CustomDateRangeStart/End, and null for the rest.\"}],\"BatchErrors\":n],\"TrackingId\":\"41cb6874-0da3-4a79-8f5c-5c49819a008a\",\"Type\":\"ApiFaultDetail\"}","request":{"url":"https://reporting.api.bingads.microsoft.com/Reporting/v13/GenerateReport/Submit"}} at _throwForStatus (/var/task/node_modules/zapier-platform-core/src/http-middlewares/after/prepare-response.js:13:11) at outResp.throwForStatus (/var/task/node_modules/zapier-platform-core/src/http-middlewares/after/prepare-response.js:70:5) at throwForStatusMiddleware (/var/task/node_modules/zapier-platform-core/src/http-middlewares/after/throw-for-status.js:5:14) at Object.<anonymous> (/var/task/node_modules/zapier-platform-core/src/middleware.js:80:37) From previous event: at /var/task/node_modules/zapier-platform-core/src/middleware.js:77:26 at Array.reduce (<anonymous>) at afterMiddleware (/var/task/node_modules/zapier-platform-core/src/middleware.js:76:21) at Object.<anonymous> (/var/task/node_modules/zapier-platform-core/src/middleware.js:94:18) From previous event: at Object.<anonymous> (/var/task/node_modules/zapier-platform-core/src/middleware.js:92:10) From previous event: at /var/task/node_modules/zapier-platform-core/src/middleware.js:89:45 at /var/task/node_modules/zapier-platform-core/src/tools/create-lambda-handler.js:280:18 at bound (node:domain:433:15) at runBound (node:domain:444:12) at process.processImmediate (node:internal/timers:476:21) at process.topLevelDomainCallback (node:domain:161:15) at process.callbackTrampoline (node:internal/async_hooks:126:24) From previous event: at Domain.<anonymous> (/var/task/node_modules/zapier-platform-core/src/tools/create-lambda-handler.js:257:10) at Domain.run (node:domain:389:15) at Runtime.handler (/var/task/node_modules/zapier-platform-core/src/tools/create-lambda-handler.js:253:19) at Runtime.handleOnceNonStreaming (file:///var/runtime/index.mjs:1173:29)

This can be closed.. turns out I had an error in the body section.


Thanks for following up to let us know you got it sorted, ​@MBuckley! When you have a moment, we’d love it if you could share exactly what changes you made to the body section to get it working. This would be super helpful for others who might stumble across this in the future! 🙏


Reply