---
title: Create Invoice Sync Job
slug: create-invoice-sync-job
docTags: 
createdAt: 2026-08-25T19:28:59.170Z
---

{
  "id": "YVB8FfeJ49LJ-FP07okQr",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.nue.io/billing/invoices/sync-jobs",
    "servers": [
      {
        "url": "https://api.nue.io/billing/invoices/sync-jobs",
        "description": "Nue Production API Endpoint"
      },
      {
        "url": "https://api.sandbox.nue.io/billing/invoices/sync-jobs",
        "description": "Nue Sandbox API Endpoint"
      }
    ],
    "name": "Create Invoice Sync Job",
    "description": "<p>Create a batch job to sync invoices/credit memos to Salesforce.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "*/*",
            "application/json"
          ],
          "default": "*/*"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "SyncJobRequestSyncJobParams",
          "schema": [
            {
              "name": "parameters",
              "kind": "optional",
              "type": "object",
              "description": "<p>The additional parameters of the batch job, currently only ‘graphqlFilter’ is supported, set this parameter in the request if only filtered records need to be synced</p>",
              "modelRef": "#/components/schemas/SyncJobParams",
              "customType": "SyncJobParams",
              "schema": [
                {
                  "name": "graphqlFilter",
                  "kind": "optional",
                  "type": "string",
                  "description": ""
                }
              ]
            },
            {
              "name": "batchSize",
              "kind": "optional",
              "type": "integer<int64>",
              "description": "<p>The size of each batch in the current job, this parameter is passed from the request</p>",
              "format": "int64"
            },
            {
              "name": "scheduleId",
              "kind": "optional",
              "type": "string",
              "description": "<p>The schedule Id if the current batch job is triggered by a scheduled job, this parameter is passed from the request</p>"
            },
            {
              "name": "name",
              "kind": "optional",
              "type": "string",
              "description": "The name of the current batch job"
            }
          ],
          "modelRef": "#/components/schemas/SyncJobRequestSyncJobParams",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiKeyAuth",
          "name": "nue-api-key",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "201",
        "description": "Created",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "400",
        "description": "Bad Request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "title",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "errorCode",
                "kind": "optional",
                "type": "string",
                "description": ""
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "404",
        "description": "Not Found",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "8eo0e4k0mzTJIkhGQmtD_",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.nue.io/billing/invoices/sync-jobs \\\n     --header 'accept: */*'"
        },
        {
          "id": "6sgMFV5W77KTC2tuD1Ze8",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"*/*\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.nue.io/billing/invoices/sync-jobs\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "PdCNJaxUcUfiUml022T6F",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.nue.io/billing/invoices/sync-jobs\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"*/*\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "39yBMbefukMOcxmpCVnJs",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.nue.io/billing/invoices/sync-jobs\"\n\npayload = {}\nheaders = {\n   'accept': '*/*',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "8eo0e4k0mzTJIkhGQmtD_"
    },
    "results": {
      "languages": [
        {
          "id": "oOHg6EGYDvmfGwhnST_ro",
          "language": "201",
          "code": "// Created\n"
        },
        {
          "id": "UGLoPDbu4w9e5a4-miQ5L",
          "language": "400",
          "code": "// Bad Request\n{\n  \"title\": \"\",\n  \"message\": \"\",\n  \"errorCode\": \"\"\n}"
        },
        {
          "id": "uLGcD_BbBKUMa5JPsei1A",
          "language": "404",
          "code": "// Not Found\n"
        }
      ],
      "selectedLanguageId": "oOHg6EGYDvmfGwhnST_ro"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}