Records Management

Create Bulk Records

Create multiple records for an object. This endpoint allows you to create multiple records at once, which can be useful for importing data or creating multiple entries quickly.

Each record in the array may also create a child record in the same request by including a key named after the child object (its singular name, e.g. contact) whose value is an object of that child's fields. The child is linked to its parent automatically and validated alongside it; a child validation failure returns a 422 with the errors keyed by the child object name.

post/api/bulk-create/{objectNames}/{recordId}/{childObjectName}

Request

  • Base URL: https://api.reallysimplesystems.com
  • URL: https://api.reallysimplesystems.com/api/bulk-create/{objectNames}/{recordId}/{childObjectName}
  • Auth: HTTP bearer

Request body

datastring[] required

An array of records to create. Each record may optionally include a key named after a child object (e.g. contact) whose value is an object of that child's fields, to create the child alongside its parent.

Example request

{
  "data": [
    {
      "Name": "Test Account API 1",
      "OwnerId": 1,
      "contact": {
        "First": "Jane",
        "Last": "Doe",
        "email": "jane.doe@example.com"
      }
    },
    {
      "Name": "Test Account API 2",
      "OwnerId": 1
    }
  ]
}

Response

statusstring
messagestring

Example response

{
  "status": "success",
  "message": "Records created successfully",
  "data": [
    {
      "metadata": {
        "url": "https://local.reallysimplesystems.com/api/contact/1",
        "list_url": "https://local.reallysimplesystems.com/api/contacts",
        "parent": null,
        "object_type": "record",
        "record_type": "contact"
      },
      "record": {
        "id": 1,
        "salutation": "Mr",
        "accountid": "95",
        "first": "Test Contact API",
        "last": "Test",
        "email": "test1@test.com"
      }
    },
    {
      "metadata": {
        "url": "https://local.reallysimplesystems.com/api/contact/2",
        "list_url": "https://local.reallysimplesystems.com/api/contacts",
        "parent": null,
        "object_type": "record",
        "record_type": "contact"
      },
      "record": {
        "id": 2,
        "salutation": "Mr",
        "accountid": "95",
        "first": "Test Contact API",
        "last": "Test",
        "email": "test2@test.com"
      }
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.