Mappings

Retrieve a mapping

get

Retrieve detailed information for a specific mapping by its ID.

Authorizations
Path parameters
idintegerRequired

Unique identifier of the resource

Example: 1
Responses
200
Detailed information about the mapping.
application/json
get
GET /api/v1/mappings/{id}/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "id": 1,
  "mapping_type": "attribute",
  "input_kwargs": {
    "value_dict": {
      "attributes__color": "red"
    }
  },
  "output_kwargs": {
    "default_value": "123",
    "default_attribute": "attribute_1"
  },
  "priority": 1,
  "mapping_key": "color",
  "created_date": "2021-01-01T00:00:00Z",
  "modified_date": "2021-01-01T00:00:00Z"
}

Update Mapping

put

Update an existing Mapping instance by ID

Authorizations
Path parameters
idintegerRequired

Unique identifier of the resource

Example: 1
Body
idinteger · int64Optional

Mapping ID

mapping_typestring · enumOptional

Type of the mapping.

Possible values:
input_kwargsobjectOptional

Input arguments in JSON format

Example: {"value_dict":{"attributes__color":"red"}}
output_kwargsobjectOptional

Output arguments in JSON format

Example: {"default_value":"123","default_attribute":"attribute_1"}
priorityintegerOptional

Priority of the mapping

Example: 1
mapping_keystringOptional

Key of the mapping

Example: color
created_datestring · date-timeOptional

The date and time when the mapping object was created

Example: 2021-01-01T00:00:00Z
modified_datestring · date-timeOptional

The date and time when the mapping object was last modified

Example: 2021-01-01T00:00:00Z
Responses
200
Mapping updated successfully
application/json
put
PUT /api/v1/mappings/{id}/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 279

{
  "id": 1,
  "mapping_type": "attribute",
  "input_kwargs": {
    "value_dict": {
      "attributes__color": "red"
    }
  },
  "output_kwargs": {
    "default_value": "123",
    "default_attribute": "attribute_1"
  },
  "priority": 1,
  "mapping_key": "color",
  "created_date": "2021-01-01T00:00:00Z",
  "modified_date": "2021-01-01T00:00:00Z"
}
{
  "id": 1,
  "mapping_type": "attribute",
  "input_kwargs": {
    "value_dict": {
      "attributes__color": "red"
    }
  },
  "output_kwargs": {
    "default_value": "123",
    "default_attribute": "attribute_1"
  },
  "priority": 1,
  "mapping_key": "color",
  "created_date": "2021-01-01T00:00:00Z",
  "modified_date": "2021-01-01T00:00:00Z"
}

Delete Mapping

delete

Delete a specific Mapping instance by ID

Authorizations
Path parameters
idintegerRequired

Unique identifier of the resource

Example: 1
Responses
204
No content
delete
DELETE /api/v1/mappings/{id}/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Accept: */*

No content

Partially Update Mapping

patch

Partially update an existing Mapping instance by ID

Authorizations
Path parameters
idintegerRequired

Unique identifier of the resource

Example: 1
Body
idinteger · int64Optional

Mapping ID

mapping_typestring · enumOptional

Type of the mapping.

Possible values:
input_kwargsobjectOptional

Input arguments in JSON format

Example: {"value_dict":{"attributes__color":"red"}}
output_kwargsobjectOptional

Output arguments in JSON format

Example: {"default_value":"123","default_attribute":"attribute_1"}
priorityintegerOptional

Priority of the mapping

Example: 1
mapping_keystringOptional

Key of the mapping

Example: color
created_datestring · date-timeOptional

The date and time when the mapping object was created

Example: 2021-01-01T00:00:00Z
modified_datestring · date-timeOptional

The date and time when the mapping object was last modified

Example: 2021-01-01T00:00:00Z
Responses
200
Mapping updated successfully
application/json
patch
PATCH /api/v1/mappings/{id}/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 279

{
  "id": 1,
  "mapping_type": "attribute",
  "input_kwargs": {
    "value_dict": {
      "attributes__color": "red"
    }
  },
  "output_kwargs": {
    "default_value": "123",
    "default_attribute": "attribute_1"
  },
  "priority": 1,
  "mapping_key": "color",
  "created_date": "2021-01-01T00:00:00Z",
  "modified_date": "2021-01-01T00:00:00Z"
}
{
  "id": 1,
  "mapping_type": "attribute",
  "input_kwargs": {
    "value_dict": {
      "attributes__color": "red"
    }
  },
  "output_kwargs": {
    "default_value": "123",
    "default_attribute": "attribute_1"
  },
  "priority": 1,
  "mapping_key": "color",
  "created_date": "2021-01-01T00:00:00Z",
  "modified_date": "2021-01-01T00:00:00Z"
}

List Mappings

get

List Mappings

Authorizations
Query parameters
pageinteger · min: 1Optional

Specifies the page number of the current dataset

Default: 1
limitinteger · min: 1Optional

Indicates the number of rows on the current page.

Default: 10
mapping_typestring · enumOptional

Filter by mapping type.

Possible values:
mapping_keystringOptional

Filter by exact mapping key.

Example: color
input_kwargs__value_dictstringOptional

Filter by input_kwargs value dictionary.

Example: {"attributes__color": "red"}
output_kwargs__default_valuestringOptional

Filter by output_kwargs default value.

Example: {"default_value": "123"}
output_kwargs__default_attributestringOptional

Filter by output_kwargs default attribute

Example: {"default_attribute": "attribute_1"}
priorityintegerOptional

Filter by priority

Example: 1
Responses
200
List of Mappings
application/json
get
GET /api/v1/mappings/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Accept: */*
[
  {
    "id": 1,
    "mapping_type": "attribute",
    "input_kwargs": {
      "value_dict": {
        "attributes__color": "red"
      }
    },
    "output_kwargs": {
      "default_value": "123",
      "default_attribute": "attribute_1"
    },
    "priority": 1,
    "mapping_key": "color",
    "created_date": "2021-01-01T00:00:00Z",
    "modified_date": "2021-01-01T00:00:00Z"
  }
]

Create a new Mapping

post

Create a new Mapping instance

Authorizations
Body
idinteger · int64Optional

Mapping ID

mapping_typestring · enumOptional

Type of the mapping.

Possible values:
input_kwargsobjectOptional

Input arguments in JSON format

Example: {"value_dict":{"attributes__color":"red"}}
output_kwargsobjectOptional

Output arguments in JSON format

Example: {"default_value":"123","default_attribute":"attribute_1"}
priorityintegerOptional

Priority of the mapping

Example: 1
mapping_keystringOptional

Key of the mapping

Example: color
created_datestring · date-timeOptional

The date and time when the mapping object was created

Example: 2021-01-01T00:00:00Z
modified_datestring · date-timeOptional

The date and time when the mapping object was last modified

Example: 2021-01-01T00:00:00Z
Responses
201
Mapping created successfully
application/json
post
POST /api/v1/mappings/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 279

{
  "id": 1,
  "mapping_type": "attribute",
  "input_kwargs": {
    "value_dict": {
      "attributes__color": "red"
    }
  },
  "output_kwargs": {
    "default_value": "123",
    "default_attribute": "attribute_1"
  },
  "priority": 1,
  "mapping_key": "color",
  "created_date": "2021-01-01T00:00:00Z",
  "modified_date": "2021-01-01T00:00:00Z"
}
{
  "id": 1,
  "mapping_type": "attribute",
  "input_kwargs": {
    "value_dict": {
      "attributes__color": "red"
    }
  },
  "output_kwargs": {
    "default_value": "123",
    "default_attribute": "attribute_1"
  },
  "priority": 1,
  "mapping_key": "color",
  "created_date": "2021-01-01T00:00:00Z",
  "modified_date": "2021-01-01T00:00:00Z"
}

Was this helpful?