# Batch Create Vendors

**Supported for:**

`freshbooks` `quickbooks` `xero` `oracleNetsuite` `sageBusinessCloud` `sageIntacct` `dynamicsBusinessCentral`

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "paths": {
    "/v2/accounting/vendors/batch": {
      "post": {
        "operationId": "push-batchVendors",
        "summary": "Batch Create Vendors",
        "description": "**Supported for:**\n\n`freshbooks` `quickbooks` `xero` `oracleNetsuite` `sageBusinessCloud` `sageIntacct` `dynamicsBusinessCentral`",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchPushVendorV2Dto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchPushVendorResponseV2Dto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request Error - Thrown if fields sent via query does not follow specifications",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error400ResponseDtoV2"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Not logged in or log in expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error401ResponseDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - Not enough permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error403ResponseDto"
                }
              }
            }
          },
          "500": {
            "description": "Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error500ResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "tags": [
          "Vendors"
        ]
      }
    }
  },
  "info": {
    "title": "FIS® Accounting Data as a Service™ API",
    "description": "[What's changed in our API](https://docs.railz.ai/changelog)",
    "version": "v2",
    "contact": {}
  },
  "servers": [
    {
      "url": "https://api.railz.ai",
      "description": "Main (production) API server"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "type": "http"
      }
    },
    "schemas": {
      "Error401Dto": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "readOnly": true,
            "example": 401
          },
          "message": {
            "readOnly": true,
            "example": [
              "Unauthorized"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "error": {
            "type": "string",
            "readOnly": true,
            "example": "Unauthorized"
          }
        },
        "required": [
          "statusCode",
          "message",
          "error"
        ]
      },
      "Error401ResponseDto": {
        "type": "object",
        "properties": {
          "error": {
            "readOnly": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/Error401Dto"
              }
            ]
          },
          "payload": {
            "type": "object",
            "readOnly": true,
            "example": {}
          }
        },
        "required": [
          "error",
          "payload"
        ]
      },
      "Error403Dto": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "readOnly": true,
            "example": 403
          },
          "message": {
            "readOnly": true,
            "example": [
              "Forbidden resource"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "error": {
            "type": "string",
            "readOnly": true,
            "example": "Forbidden"
          }
        },
        "required": [
          "statusCode",
          "message",
          "error"
        ]
      },
      "Error403ResponseDto": {
        "type": "object",
        "properties": {
          "error": {
            "readOnly": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/Error403Dto"
              }
            ]
          },
          "payload": {
            "type": "object",
            "readOnly": true,
            "example": {}
          }
        },
        "required": [
          "error",
          "payload"
        ]
      },
      "Error500Dto": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "readOnly": true,
            "example": "Internal Server Error"
          },
          "message": {
            "readOnly": true,
            "example": [
              "INTERNAL_ERROR"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "statusCode": {
            "type": "number",
            "readOnly": true,
            "example": 500
          }
        },
        "required": [
          "error",
          "message",
          "statusCode"
        ]
      },
      "Error500ResponseDto": {
        "type": "object",
        "properties": {
          "error": {
            "readOnly": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/Error500Dto"
              }
            ]
          },
          "payload": {
            "type": "object",
            "readOnly": true
          }
        },
        "required": [
          "error",
          "payload"
        ]
      },
      "Error400DtoV2": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "readOnly": true,
            "example": 400
          },
          "message": {
            "readOnly": true,
            "example": [
              "connectionUuid should not be empty"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "error": {
            "type": "string",
            "readOnly": true,
            "example": "Bad Request"
          }
        },
        "required": [
          "statusCode",
          "message",
          "error"
        ]
      },
      "Error400ResponseDtoV2": {
        "type": "object",
        "properties": {
          "error": {
            "readOnly": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/Error400DtoV2"
              }
            ]
          },
          "payload": {
            "type": "object",
            "readOnly": true
          }
        },
        "required": [
          "error",
          "payload"
        ]
      },
      "SubsidiaryRefDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "4"
          }
        },
        "required": [
          "id"
        ]
      },
      "PaymentMethodRefDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "1"
          },
          "name": {
            "type": "string",
            "example": "Harmonized sales tax"
          },
          "type": {
            "type": "string",
            "example": "creditCard",
            "enum": [
              "unknown",
              "cash",
              "check",
              "creditCard",
              "debitCard",
              "bankTransfer",
              "giftCard",
              "other"
            ]
          }
        }
      },
      "ParentRefDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "32"
          }
        },
        "required": [
          "id"
        ]
      },
      "BillingAddressDto": {
        "type": "object",
        "properties": {
          "line1": {
            "type": "string",
            "maxLength": 500,
            "example": "1234 Park Street"
          },
          "line2": {
            "type": "string",
            "maxLength": 500,
            "example": "Suite 1000"
          },
          "city": {
            "type": "string",
            "maxLength": 255,
            "example": "Toronto"
          },
          "region": {
            "type": "string",
            "maxLength": 255,
            "example": "ON",
            "description": "Region within a country. For example, state name for USA, province name for Canada."
          },
          "country": {
            "type": "string",
            "example": "CAN",
            "description": "Country name as 3 ISO alpha-3 characters."
          },
          "postalCode": {
            "type": "string",
            "maxLength": 30,
            "example": "A0B1C2",
            "description": "Postal code. For example, zip code for USA and Canada."
          }
        }
      },
      "ShippingAddressDto": {
        "type": "object",
        "properties": {
          "line1": {
            "type": "string",
            "maxLength": 500,
            "example": "1234 Park Street"
          },
          "line2": {
            "type": "string",
            "maxLength": 500,
            "example": "Suite 1000"
          },
          "city": {
            "type": "string",
            "maxLength": 255,
            "example": "Toronto"
          },
          "region": {
            "type": "string",
            "maxLength": 255,
            "example": "ON",
            "description": "Region within a country. For example, state name for USA, province name for Canada."
          },
          "country": {
            "type": "string",
            "example": "CAN",
            "description": "Country name as 3 ISO alpha-3 characters."
          },
          "postalCode": {
            "type": "string",
            "maxLength": 30,
            "example": "A0B1C2",
            "description": "Postal code. For example, zip code for USA and Canada."
          }
        }
      },
      "CustomerVendorPushAddressV2": {
        "type": "object",
        "properties": {
          "line1": {
            "type": "string",
            "example": "1234 Park Street"
          },
          "line2": {
            "type": "string",
            "example": "Suite 1000"
          },
          "city": {
            "type": "string",
            "example": "Toronto"
          },
          "region": {
            "type": "string",
            "example": "ON"
          },
          "country": {
            "type": "string",
            "example": "CAN"
          },
          "postalCode": {
            "type": "string",
            "example": "A0B1C2"
          },
          "type": {
            "type": "string",
            "enum": [
              "billing",
              "shipping",
              "other"
            ],
            "example": "billing"
          }
        }
      },
      "PushCustomerVendorContactV2": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "John Smith"
          },
          "email": {
            "type": "string",
            "example": "jsmith@company.com"
          },
          "phone": {
            "type": "string",
            "example": "8887779999"
          },
          "address": {
            "$ref": "#/components/schemas/CustomerVendorPushAddressV2"
          }
        }
      },
      "PushVendorV2": {
        "type": "object",
        "properties": {
          "contactFirstName": {
            "type": "string",
            "maxLength": 100,
            "example": "Jane"
          },
          "contactLastName": {
            "type": "string",
            "maxLength": 100,
            "example": "Smith"
          },
          "emailAddress": {
            "type": "string",
            "maxLength": 100,
            "example": "email@acme.com"
          },
          "phone": {
            "type": "string",
            "maxLength": 30,
            "example": "8889990000"
          },
          "website": {
            "type": "string",
            "maxLength": 100,
            "format": "uri",
            "example": "www.acme.com"
          },
          "isPerson": {
            "type": "boolean"
          },
          "vendorName": {
            "type": "string",
            "maxLength": 500,
            "example": "ACME Inc."
          },
          "contactName": {
            "type": "string",
            "maxLength": 500,
            "example": "Jane Smith"
          },
          "parentRef": {
            "$ref": "#/components/schemas/ParentRefDto"
          },
          "currency": {
            "type": "string",
            "example": "CAD"
          },
          "paymentMethodRef": {
            "$ref": "#/components/schemas/PaymentMethodRefDto"
          },
          "billingAddress": {
            "$ref": "#/components/schemas/BillingAddressDto"
          },
          "shippingAddress": {
            "$ref": "#/components/schemas/ShippingAddressDto"
          },
          "subsidiaryRefs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubsidiaryRefDto"
            }
          },
          "contacts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PushCustomerVendorContactV2"
            }
          },
          "taxNumber": {
            "type": "string",
            "example": "987654321"
          },
          "passThrough": {
            "type": "object",
            "example": {
              "CustomField": [
                {
                  "DefinitionId": "1",
                  "StringValue": "my custom value",
                  "Name": "Field One"
                }
              ]
            }
          }
        }
      },
      "BatchPushVendorV2Dto": {
        "type": "object",
        "properties": {
          "connectionUuid": {
            "type": "string",
            "description": "Unique connection identifier.",
            "example": "CON-396d5daa-26b2-4979-89b6-cafb2c298155"
          },
          "batch": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PushVendorV2"
            }
          }
        },
        "required": [
          "connectionUuid",
          "batch"
        ]
      },
      "PushVendorIndividualResponseV2Dto": {
        "type": "object",
        "properties": {
          "pushCommunicationId": {
            "type": "string",
            "readOnly": true,
            "example": "60473b57f0cdd1683ca71f60"
          },
          "requestedOn": {
            "type": "string",
            "readOnly": true,
            "example": "2021-03-09T08:15:22.035Z",
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "readOnly": true,
            "example": "pending",
            "enum": [
              "success",
              "failed",
              "pending"
            ]
          },
          "data": {
            "readOnly": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/PushVendorV2"
              }
            ]
          }
        },
        "required": [
          "pushCommunicationId",
          "requestedOn",
          "status",
          "data"
        ]
      },
      "BatchPushVendorResponseV2Dto": {
        "type": "object",
        "properties": {
          "connectionUuid": {
            "type": "string",
            "readOnly": true,
            "example": "CON-396d5daa-26b2-4979-89b6-cafb2c298155"
          },
          "businessName": {
            "type": "string",
            "readOnly": true,
            "example": "Railz"
          },
          "serviceName": {
            "type": "string",
            "readOnly": true,
            "example": "xero",
            "enum": [
              "freshbooks",
              "quickbooks",
              "quickbooksDesktop",
              "xero",
              "oracleNetsuite",
              "sageBusinessCloud",
              "sageIntacct",
              "dynamicsBusinessCentral",
              "dynamics365Finance",
              "wave",
              "myob",
              "zohoBooks",
              "byod"
            ]
          },
          "batchId": {
            "type": "string",
            "readOnly": true,
            "example": "60473b57f0cdd1683ca71f60"
          },
          "batch": {
            "readOnly": true,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PushVendorIndividualResponseV2Dto"
            }
          }
        },
        "required": [
          "connectionUuid",
          "businessName",
          "serviceName",
          "batchId",
          "batch"
        ]
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 105,
      "1": 197,
      "2": 83,
      "3": 253,
      "4": 33,
      "5": 146,
      "6": 141,
      "7": 123,
      "8": 116,
      "9": 91,
      "10": 53,
      "11": 182
    }
  }
}
```