Skip to content

Legacy Migration

The Legacy Migration object

object

Attributes

idstring

Job ID

Other attributes
legacy_org_idstring
environmentstring
entity_idstring
statusstring
stepstring
step_numbernumber
total_stepsnumber
progress_detailstring
errorstring
created_atstring
started_atstring
completed_atstring

Authenticate with legacy API

POST/legacy-migration/auth

Authenticate with legacy Space Invoices credentials and get a list of owned organizations.

Header parameters

account_idstringoptional

Account Id on which the request is made. Optional if user is part of only one account.

Body parameters

emailstring<email>required

Email for legacy Space Invoices account

passwordstringrequired

Password for legacy Space Invoices account

curl -X POST "https://eu.spaceinvoices.com/legacy-migration/auth" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-account-id: YOUR_ACCOUNT_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "string",
    "password": "string"
  }'

Returns

organizationsarray of objects
json
{
  "organizations": [
    {
      "id": "string",
      "name": "string",
      "country": "string",
      "tax_number": "string",
      "created_at": "string",
      "already_migrated": true,
      "migrated_environment": "string"
    }
  ]
}

Create migration job

POST/legacy-migration/jobs

Create a new legacy migration job.

Header parameters

account_idstringoptional

Account Id on which the request is made. Optional if user is part of only one account.

Body parameters

legacy_org_idstringrequired

Legacy organization ID to migrate

environmentstringrequired

Target environment

Possible values: "live", "sandbox"

curl -X POST "https://eu.spaceinvoices.com/legacy-migration/jobs" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-account-id: YOUR_ACCOUNT_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "legacy_org_id": "string",
    "environment": "live"
  }'

List migration jobs

GET/legacy-migration/jobs

List all migration jobs for the current account.

Header parameters

account_idstringoptional

Account Id on which the request is made. Optional if user is part of only one account.

curl "https://eu.spaceinvoices.com/legacy-migration/jobs" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-account-id: YOUR_ACCOUNT_ID"

Returns

dataarray of objects
json
{
  "data": [
    {
      "id": "string",
      "legacy_org_id": "string",
      "environment": "string",
      "entity_id": "string",
      "status": "pending",
      "step": "string",
      "step_number": 0,
      "total_steps": 0,
      "progress_detail": "string",
      "error": "string",
      "created_at": "string",
      "started_at": "string",
      "completed_at": "string"
    }
  ]
}

Get migration job status

GET/legacy-migration/jobs/{id}

Get status and progress of a migration job.

Header parameters

account_idstringoptional

Account Id on which the request is made. Optional if user is part of only one account.

Path parameters

idstringrequired

Migration job ID

curl "https://eu.spaceinvoices.com/legacy-migration/jobs/{id}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-account-id: YOUR_ACCOUNT_ID"

Returns

idstring

Job ID

Other parameters
legacy_org_idstring
environmentstring
entity_idstring
statusstring
stepstring
step_numbernumber
total_stepsnumber
progress_detailstring
errorstring
created_atstring
started_atstring
completed_atstring
json
{
  "id": "string",
  "legacy_org_id": "string",
  "environment": "string",
  "entity_id": "string",
  "status": "pending",
  "step": "string",
  "step_number": 0,
  "total_steps": 0,
  "progress_detail": "string",
  "error": "string",
  "created_at": "string",
  "started_at": "string",
  "completed_at": "string"
}