---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.3
alternate:
  - https://yandex.com/dev/partner-objects/doc/en/reference/post-resource-id-object-id-action-action-name.md
  - https://yandex.com/dev/partner-objects/doc/ru/reference/post-resource-id-object-id-action-action-name.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/dev/partner-objects/doc/en/llms.txt


# POST/{resource-id}/{object-id}/action/{action-name}

Performs the specified action with the object.

## Request format {#input}

```
POST https://jsonapi.partner2.yandex.com/vX/{resource-id}/{object-id}/action/{action-name}
```

#|
|| **Parameter** | **Description** ||
|| `resource-id`
| ID of the resource where the object is located.
||
|| `object-id`
| The ID of the object to perform the action on.
||
|| `action-name`
| The action to perform with the object

{% note alert "Restriction." %}

The allowed values depend on the resource that the object belongs to. They are listed in the actions parameter for the [GET/{resource-id}/{object-id}](https://yandex.com/dev/partner-objects/doc/en/reference/get-resource-id-object-id.md) operation.

{% endnote %}

||
|#

The general structure of the response is given below. The elements may appear in a different order. The structure may contain internal parameters that are not described in the table.


## Response format {#output-structure}

## JSON

```json
{
  "data": 
  {
    "relationships": {
      "{string}": {
        "links": {
          "related": "{string}",
          "self": "{string}"
        }
      }
    },
    "id": "{string}",
    "type": "{string}",
    "attributes": {}
  },
  "meta": {
    "fields": []
  },
  "links": {
    "self": "{string}"
  }
}    
```

## Response parameters {#spec-output}

- **data** Array with information for the specified object.

  - **relationships** Related resources and objects.

    - **links** References to objects related to the current object.

      - **related** Reference to a list of related objects with parameters.

      - **self** Reference to a list of related objects.

  - **id** Object ID.

  - **type** Resource type.

  - **attributes** Object parameters.

- **meta** This object contains meta information.

  - **fields** Object parameters.

- **links** Links associated with the object.

  - **self** Reference to the current object.

<!--
<tree ><tree-item ><tree-itemname >data</tree-itemname><tree-itemdesc > Массив с информацией по указанному объекту. </tree-itemdesc><tree-item id="relationships"><tree-itemname >relationships</tree-itemname><tree-itemdesc > Связанные ресурсы и объекты. </tree-itemdesc><tree-item ><tree-itemname >links</tree-itemname><tree-itemdesc > Ссылки на объекты, связанные с текущим объектом. </tree-itemdesc><tree-item ><tree-itemname >related</tree-itemname><tree-itemdesc > Ссылка на список связанных объектов с параметрами. </tree-itemdesc></tree-item><tree-item ><tree-itemname >self</tree-itemname><tree-itemdesc > Ссылка на список связанных объектов. </tree-itemdesc></tree-item></tree-item></tree-item><tree-item ><tree-itemname >id</tree-itemname><tree-itemdesc > Идентификатор объекта. </tree-itemdesc></tree-item><tree-item ><tree-itemname >type</tree-itemname><tree-itemdesc > Тип рсурса. </tree-itemdesc></tree-item><tree-item ><tree-itemname >attributes</tree-itemname><tree-itemdesc > Параметры объекта. </tree-itemdesc></tree-item></tree-item><tree-item ><tree-itemname >meta</tree-itemname><tree-itemdesc > Объект содержит метаинформацию. </tree-itemdesc><tree-item ><tree-itemname >fields</tree-itemname><tree-itemdesc > Параметры объекта. </tree-itemdesc></tree-item></tree-item><tree-item id="links-self"><tree-itemname >links</tree-itemname><tree-itemdesc id="links"> Ссылки, связанные с объектом. </tree-itemdesc><tree-item ><tree-itemname >self</tree-itemname><tree-itemdesc id="self"> Ссылка на текущий объект. </tree-itemdesc></tree-item></tree-item></tree>
-->


## Example for JSON {#example-JSON}

> Request:
> 
> ```
> curl -i -g -H "Accept: application/vnd.api+json" -H "Content-Type: application/vnd.api+json" -H "Authorization: token 66.." -X POST 'https://jsonapi.partner2.yandex.com/v1/context_on_site_rtb/R-A-1056-1/action/duplicate'
> ```
> 
> Response:
> 
> ```json
> HTTP/1.1 200 OK
> Server: nginx/1.8.1
> Date: Wed, 18 Jan 2017 17:33:25 GMT
> Content-Type: application/vnd.api+json
> Content-Length: 757
> Connection: keep-alive{
>   "data":{
>     "relationships":{
>       "context_on_site_campaign":{
>         "links":{
>           "related": "https://jsonapi.partner2.yandex.com/v1/context_on_site_rtb/R-A-1056-2/context_on_site_campaign",
>           "self": "https://jsonapi.partner2.yandex.com/v1/context_on_site_rtb/R-A-1056-2/relationships/context_on_site_campaign"
>         }
>       },
>       "pages":{
>         "links":{
>           "related": "https://jsonapi.partner2.yandex.com/v1/context_on_site_rtb/R-A-1056-2/pages",
>           "self": "https://jsonapi.partner2.yandex.com/v1/context_on_site_rtb/R-A-1056-2/relationships/pages"
>         }
>       }
>     },
>     "id": "R-A-1056-2",
>     "type": "context_on_site_rtb",
>     "attributes":{}
>   },
>   "meta":{
>     "fields": []
>   },
>   "links":{
>     "self": "https://jsonapi.partner2.yandex.com/v1/context_on_site_rtb/R-A-1056-2"
>   }
> }
>       
> ```

