All URIs are relative to https://api.pinterest.com/v5
Method | HTTP request | Description |
---|---|---|
integrations_commerce_del | DELETE /integrations/commerce/{external_business_id} | Delete commerce integration |
integrations_commerce_get | GET /integrations/commerce/{external_business_id} | Get commerce integration |
integrations_commerce_patch | PATCH /integrations/commerce/{external_business_id} | Update commerce integration |
integrations_commerce_post | POST /integrations/commerce | Create commerce integration |
integrations_get_by_id | GET /integrations/{id} | Get integration metadata |
integrations_get_list | GET /integrations | Get integration metadata list |
integrations_logs_post | POST /integrations/logs | Receives batched logs from integration applications. |
integrations_commerce_del(external_business_id)
Delete commerce integration
Delete commerce integration metadata for the given external business ID. Note: If you're interested in joining the beta, please reach out to your Pinterest account manager.
- OAuth Authentication (pinterest_oauth2):
import time
import openapi_generated.pinterest_client
from openapi_generated.pinterest_client.api import integrations_api
from openapi_generated.pinterest_client.model.error import Error
from pprint import pprint
# Defining the host is optional and defaults to https://api.pinterest.com/v5
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_generated.pinterest_client.Configuration(
host = "https://api.pinterest.com/v5"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure OAuth2 access token for authorization: pinterest_oauth2
configuration = openapi_generated.pinterest_client.Configuration(
host = "https://api.pinterest.com/v5"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with openapi_generated.pinterest_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = integrations_api.IntegrationsApi(api_client)
external_business_id = "external_business_id_example" # str | External business ID for the integration.
# example passing only required values which don't have defaults set
try:
# Delete commerce integration
api_instance.integrations_commerce_del(external_business_id)
except openapi_generated.pinterest_client.ApiException as e:
print("Exception when calling IntegrationsApi->integrations_commerce_del: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
external_business_id | str | External business ID for the integration. |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | Commerce Integration deleted successfully | - |
0 | Unexpected error. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
IntegrationMetadata integrations_commerce_get(external_business_id)
Get commerce integration
Get commerce integration metadata associated with the given external business ID. Note: If you're interested in joining the beta, please reach out to your Pinterest account manager.
- OAuth Authentication (pinterest_oauth2):
import time
import openapi_generated.pinterest_client
from openapi_generated.pinterest_client.api import integrations_api
from openapi_generated.pinterest_client.model.error import Error
from openapi_generated.pinterest_client.model.integration_metadata import IntegrationMetadata
from pprint import pprint
# Defining the host is optional and defaults to https://api.pinterest.com/v5
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_generated.pinterest_client.Configuration(
host = "https://api.pinterest.com/v5"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure OAuth2 access token for authorization: pinterest_oauth2
configuration = openapi_generated.pinterest_client.Configuration(
host = "https://api.pinterest.com/v5"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with openapi_generated.pinterest_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = integrations_api.IntegrationsApi(api_client)
external_business_id = "external_business_id_example" # str | External business ID for the integration.
# example passing only required values which don't have defaults set
try:
# Get commerce integration
api_response = api_instance.integrations_commerce_get(external_business_id)
pprint(api_response)
except openapi_generated.pinterest_client.ApiException as e:
print("Exception when calling IntegrationsApi->integrations_commerce_get: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
external_business_id | str | External business ID for the integration. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
404 | Integration not found. | - |
409 | Can't access this integration metadata. | - |
0 | Unexpected error. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
IntegrationMetadata integrations_commerce_patch(external_business_id)
Update commerce integration
Update commerce integration metadata for the given external business ID. Note: If you're interested in joining the beta, please reach out to your Pinterest account manager.
- OAuth Authentication (pinterest_oauth2):
import time
import openapi_generated.pinterest_client
from openapi_generated.pinterest_client.api import integrations_api
from openapi_generated.pinterest_client.model.error import Error
from openapi_generated.pinterest_client.model.integration_metadata import IntegrationMetadata
from openapi_generated.pinterest_client.model.integration_request_patch import IntegrationRequestPatch
from pprint import pprint
# Defining the host is optional and defaults to https://api.pinterest.com/v5
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_generated.pinterest_client.Configuration(
host = "https://api.pinterest.com/v5"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure OAuth2 access token for authorization: pinterest_oauth2
configuration = openapi_generated.pinterest_client.Configuration(
host = "https://api.pinterest.com/v5"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with openapi_generated.pinterest_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = integrations_api.IntegrationsApi(api_client)
external_business_id = "external_business_id_example" # str | External business ID for the integration.
integration_request_patch = IntegrationRequestPatch(
connected_merchant_id="connected_merchant_id_example",
connected_advertiser_id="connected_advertiser_id_example",
connected_lba_id="connected_lba_id_example",
connected_tag_id="connected_tag_id_example",
partner_access_token="partner_access_token_example",
partner_refresh_token="partner_refresh_token_example",
partner_primary_email="partner_primary_email_example",
partner_access_token_expiry=3.14,
partner_refresh_token_expiry=3.14,
scopes="scopes_example",
additional_id_1="additional_id_1_example",
partner_metadata="partner_metadata_example",
) # IntegrationRequestPatch | Parameters to get create/update the Integration Metadata (optional)
# example passing only required values which don't have defaults set
try:
# Update commerce integration
api_response = api_instance.integrations_commerce_patch(external_business_id)
pprint(api_response)
except openapi_generated.pinterest_client.ApiException as e:
print("Exception when calling IntegrationsApi->integrations_commerce_patch: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Update commerce integration
api_response = api_instance.integrations_commerce_patch(external_business_id, integration_request_patch=integration_request_patch)
pprint(api_response)
except openapi_generated.pinterest_client.ApiException as e:
print("Exception when calling IntegrationsApi->integrations_commerce_patch: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
external_business_id | str | External business ID for the integration. | |
integration_request_patch | IntegrationRequestPatch | Parameters to get create/update the Integration Metadata | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
404 | Integration not found. | - |
409 | Can't access this integration metadata. | - |
0 | Unexpected error. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
IntegrationMetadata integrations_commerce_post()
Create commerce integration
Create commerce integration metadata to link an external business ID with a Pinterest merchant & ad account. Note: If you're interested in joining the beta, please reach out to your Pinterest account manager.
- OAuth Authentication (pinterest_oauth2):
import time
import openapi_generated.pinterest_client
from openapi_generated.pinterest_client.api import integrations_api
from openapi_generated.pinterest_client.model.integration_request import IntegrationRequest
from openapi_generated.pinterest_client.model.error import Error
from openapi_generated.pinterest_client.model.integration_metadata import IntegrationMetadata
from pprint import pprint
# Defining the host is optional and defaults to https://api.pinterest.com/v5
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_generated.pinterest_client.Configuration(
host = "https://api.pinterest.com/v5"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure OAuth2 access token for authorization: pinterest_oauth2
configuration = openapi_generated.pinterest_client.Configuration(
host = "https://api.pinterest.com/v5"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with openapi_generated.pinterest_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = integrations_api.IntegrationsApi(api_client)
integration_request = IntegrationRequest(
external_business_id="external_business_id_example",
connected_merchant_id="connected_merchant_id_example",
connected_advertiser_id="connected_advertiser_id_example",
connected_lba_id="connected_lba_id_example",
connected_tag_id="connected_tag_id_example",
partner_access_token="partner_access_token_example",
partner_refresh_token="partner_refresh_token_example",
partner_primary_email="partner_primary_email_example",
partner_access_token_expiry=1,
partner_refresh_token_expiry=1,
scopes="scopes_example",
additional_id_1="additional_id_1_example",
partner_metadata="partner_metadata_example",
) # IntegrationRequest | Parameters to get create/update the Integration Metadata (optional)
# example passing only required values which don't have defaults set
# and optional values
try:
# Create commerce integration
api_response = api_instance.integrations_commerce_post(integration_request=integration_request)
pprint(api_response)
except openapi_generated.pinterest_client.ApiException as e:
print("Exception when calling IntegrationsApi->integrations_commerce_post: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
integration_request | IntegrationRequest | Parameters to get create/update the Integration Metadata | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
404 | Integration not found. | - |
409 | Can't access this integration metadata. | - |
0 | Unexpected error. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
IntegrationRecord integrations_get_by_id(id)
Get integration metadata
Get integration metadata by ID. Note: If you're interested in joining the beta, please reach out to your Pinterest account manager.
- OAuth Authentication (pinterest_oauth2):
import time
import openapi_generated.pinterest_client
from openapi_generated.pinterest_client.api import integrations_api
from openapi_generated.pinterest_client.model.error import Error
from openapi_generated.pinterest_client.model.integration_record import IntegrationRecord
from pprint import pprint
# Defining the host is optional and defaults to https://api.pinterest.com/v5
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_generated.pinterest_client.Configuration(
host = "https://api.pinterest.com/v5"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure OAuth2 access token for authorization: pinterest_oauth2
configuration = openapi_generated.pinterest_client.Configuration(
host = "https://api.pinterest.com/v5"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with openapi_generated.pinterest_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = integrations_api.IntegrationsApi(api_client)
id = "id_example" # str | Integration ID.
# example passing only required values which don't have defaults set
try:
# Get integration metadata
api_response = api_instance.integrations_get_by_id(id)
pprint(api_response)
except openapi_generated.pinterest_client.ApiException as e:
print("Exception when calling IntegrationsApi->integrations_get_by_id: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Integration ID. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
404 | Integration not found. | - |
0 | Unexpected error. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
bool, date, datetime, dict, float, int, list, str, none_type integrations_get_list()
Get integration metadata list
Get integration metadata list. Note: If you're interested in joining the beta, please reach out to your Pinterest account manager.
- OAuth Authentication (pinterest_oauth2):
import time
import openapi_generated.pinterest_client
from openapi_generated.pinterest_client.api import integrations_api
from openapi_generated.pinterest_client.model.error import Error
from openapi_generated.pinterest_client.model.paginated import Paginated
from openapi_generated.pinterest_client.model.integration_record import IntegrationRecord
from pprint import pprint
# Defining the host is optional and defaults to https://api.pinterest.com/v5
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_generated.pinterest_client.Configuration(
host = "https://api.pinterest.com/v5"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure OAuth2 access token for authorization: pinterest_oauth2
configuration = openapi_generated.pinterest_client.Configuration(
host = "https://api.pinterest.com/v5"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with openapi_generated.pinterest_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = integrations_api.IntegrationsApi(api_client)
bookmark = "bookmark_example" # str | Cursor used to fetch the next page of items (optional)
page_size = 25 # int | Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. (optional) if omitted the server will use the default value of 25
# example passing only required values which don't have defaults set
# and optional values
try:
# Get integration metadata list
api_response = api_instance.integrations_get_list(bookmark=bookmark, page_size=page_size)
pprint(api_response)
except openapi_generated.pinterest_client.ApiException as e:
print("Exception when calling IntegrationsApi->integrations_get_list: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
bookmark | str | Cursor used to fetch the next page of items | [optional] |
page_size | int | Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/reference/pagination/'>Pagination</a> for more information. | [optional] if omitted the server will use the default value of 25 |
bool, date, datetime, dict, float, int, list, str, none_type
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
0 | Unexpected error. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
IntegrationLogsSuccessResponse integrations_logs_post(integration_logs_request)
Receives batched logs from integration applications.
This endpoint receives batched logs from integration applications on partner platforms. Note: If you're interested in joining the beta, please reach out to your Pinterest account manager.
- OAuth Authentication (pinterest_oauth2):
import time
import openapi_generated.pinterest_client
from openapi_generated.pinterest_client.api import integrations_api
from openapi_generated.pinterest_client.model.error import Error
from openapi_generated.pinterest_client.model.integration_logs_success_response import IntegrationLogsSuccessResponse
from openapi_generated.pinterest_client.model.detailed_error import DetailedError
from openapi_generated.pinterest_client.model.integration_logs_request import IntegrationLogsRequest
from pprint import pprint
# Defining the host is optional and defaults to https://api.pinterest.com/v5
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_generated.pinterest_client.Configuration(
host = "https://api.pinterest.com/v5"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure OAuth2 access token for authorization: pinterest_oauth2
configuration = openapi_generated.pinterest_client.Configuration(
host = "https://api.pinterest.com/v5"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with openapi_generated.pinterest_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = integrations_api.IntegrationsApi(api_client)
integration_logs_request = IntegrationLogsRequest(
logs=[
IntegrationLog(
client_timestamp=1,
event_type="APP",
log_level="INFO",
external_business_id="external_business_id_example",
advertiser_id="advertiser_id_example",
merchant_id="merchant_id_example",
tag_id="tag_id_example",
feed_profile_id="feed_profile_id_example",
message="message_example",
app_version_number="app_version_number_example",
platform_version_number="platform_version_number_example",
error=IntegrationLogClientError(
cause="cause_example",
column_number=1,
file_name="file_name_example",
line_number=1,
message="message_example",
message_detail="message_detail_example",
name="name_example",
number=1,
stack_trace="stack_trace_example",
),
request=IntegrationLogClientRequest(
method="GET",
host="host_example",
path="path_example",
request_headers={
"key": "key_example",
},
response_headers={
"key": "key_example",
},
response_status_code=1,
),
),
],
) # IntegrationLogsRequest | Ingest log information from external integration application.
# example passing only required values which don't have defaults set
try:
# Receives batched logs from integration applications.
api_response = api_instance.integrations_logs_post(integration_logs_request)
pprint(api_response)
except openapi_generated.pinterest_client.ApiException as e:
print("Exception when calling IntegrationsApi->integrations_logs_post: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
integration_logs_request | IntegrationLogsRequest | Ingest log information from external integration application. |
IntegrationLogsSuccessResponse
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success. | - |
400 | Bad request. | - |
0 | Unexpected error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]