Import Profiles Commit

Import Profiles Commit

POST https://api.ocamba.com/v1/hood/profiles/imports/{id}/commit

Finalizing the data import and saving the profile information into the Ocamba system.

Rate limits:

Burst: 10/s
Steady: 150/m

Path parameters

parameters

Request schema

body

Response schemas

POST https://api.ocamba.com/v1/hood/profiles/imports/{id}/commit HTTP/1.1
Host: api.ocamba.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
{
  "mapping": [
    {}
  ]
}
curl -X POST "https://api.ocamba.com/v1/hood/profiles/imports/{id}/commit" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mapping":[{}]}'
fetch("https://api.ocamba.com/v1/hood/profiles/imports/{id}/commit", {
  method: "POST",
  headers: { Authorization: `Bearer ${TOKEN}`, "Content-Type": "application/json" },
  body: JSON.stringify(
    {
      "mapping": [
        {}
      ]
    }
  )
}).then(r => r.json());
$ch = curl_init("https://api.ocamba.com/v1/hood/profiles/imports/{id}/commit");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer $token",
  "Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
  [
    "mapping" => [
      []
    ]
  ]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);

Responses

202 Accepted

HTTP/1.1 202 Accepted
Content-Type: application/json

{
  "id": "05ef4b72-ad7c-4199-baea-d7cb9150f19b",
  "company_id": "7196310",
  "creator_id": "1000163",
  "status": "finished",
  "profile_lists": [
    "1000000"
  ],
  "file": {
    "path": "./profiles/imports/1001001/05ef4b72-ad7c-4199-baea-d7cb9150f19b",
    "size": 124,
    "name": "example.csv",
    "mimetype": "text/csv",
    "extension": "csv"
  },
  "mapping": {
    "mapped": 10,
    "unmapped": 2,
    "items": [
      {
        "label": "email",
        "property": {
          "label": "email",
          "data_type": "text",
          "example": "text"
        }
      }
    ]
  },
  "total_records": 10000,
  "imported_records": 7000,
  "failed_records": 3000,
  "expire_time": "2025-01-29 12:47:00",
  "create_time": "2025-01-29 12:47:00",
  "update_time": "2025-01-30 14:27:26"
}

400 Bad Request

HTTP/1.1 400 Bad Request
Content-Type: application/json

{
  "code": 400,
  "title": "Bad request.",
  "message": "The request body is not valid.",
  "trace_id": "99a84211-f73d-4ff8-acdf-eb3e06bb9d62"
}

500 Internal Server Error

HTTP/1.1 500 Internal Server Error
Content-Type: application/json

{
  "code": 500,
  "title": "Internal server error.",
  "trace_id": "99a84211-f73d-4ff8-acdf-eb3e06bb9d62"
}
Responses

Note
1
At least one of email or mobile_phone_number is required.