Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.
openapi: 3.2.0
info:
title: Getty Images Batches API
version: '3'
description: '
Developer resources for the Getty Images API including SDK, documentation,
release notes, status, notifications and sample code.'
servers:
- url: https://api.gettyimages.com
description: Base URL declared by the provider in apis.yml (roadmap#122).
security:
- Api-Key: []
- OAuth2: []
tags:
- name: Batches
paths:
/v3/usage-batches/{id}:
put:
tags:
- Batches
summary: Report usage of assets via a batch format.
description: "# Report Usage\n\nUse this endpoint to report the usages of a set of assets. The count of assets submitted in a single batch to this endpoint is limited to 1000. Note that all asset Ids specified must be valid or the operation will fail causing no usages to be recorded. In this case, you will need to remove the invalid asset Ids from the query request and re-submit the query.\n\n## Quickstart\n\nYou'll need an API key and an access token to use this resource. \n\n_Note_: Date of use can be in any unambiguous date format.\n"
parameters:
- name: id
in: path
description: Specifies a unique batch transaction id to identify the report.
required: true
schema:
type:
- string
- 'null'
description: Specifies a unique batch transaction id to identify the report.
requestBody:
description: "Specifies up to 1000 sets of asset Id, usage count, and date of use to submit usages for. \n Note that all asset Ids specified must be valid or the operation will fail causing no usages to be recorded. \n All dates must be on or before this date and the format should be ISO 8601 (ex: YYYY-MM-DD), time is not needed."
content:
application/json:
schema:
$ref: '#/components/schemas/report_usage_batch_request'
responses:
'201':
description: Success - All usages reported were successfully recorded.
content:
application/json:
schema:
$ref: '#/components/schemas/report_usage_batch_response'
'400':
description: InvalidRequest - The content of the request was invalid. Most commonly this is due to either too many assets specified, no assets or invalid JSON.
'401':
description: AuthorizationTokenRequired - Authorization token was missing or not valid.
'403':
description: UnauthorizedToReportUsage
'409':
description: TransactionIdDuplicated
components:
schemas:
report_usage_batch_response:
type: object
properties:
invalid_assets:
type:
- array
- 'null'
items:
type: string
description: Identifies a list of asset ids submitted that did not match known Getty asset ids.
total_asset_usages_processed:
type:
- integer
- 'null'
description: Specifies the number of asset usage records that were successfully recorded.
format: int32
additionalProperties: false
description: Specifies the response from the Batch Usages endpoint.
asset_usage:
type: object
properties:
asset_id:
type:
- string
- 'null'
description: Specifies the Id of the asset that was used.
quantity:
type: integer
description: Specifies the number of times the asset was used.
format: int32
usage_date:
type: string
description: Identifies the date the asset was used, in ISO 8601 format (e.g., YYYY-MM-DD), time is not needed.
format: date-time
additionalProperties: false
description: Specifies the id, usage Quantity, and date of when an asset was used.
report_usage_batch_request:
type: object
properties:
asset_usages:
type:
- array
- 'null'
items:
$ref: '#/components/schemas/asset_usage'
description: Identifies the list of asset id, usage count and date of usage combinations to record.
additionalProperties: false
description: Specifies the request information for the Batch Usages endpoint.
securitySchemes:
Api-Key:
type: apiKey
name: Api-Key
in: header
OAuth2:
type: oauth2
flows:
password:
tokenUrl: https://api.gettyimages.com/v4/oauth2/token
refreshUrl: https://api.gettyimages.com/v4/oauth2/token
scopes: {}
clientCredentials:
tokenUrl: https://api.gettyimages.com/v4/oauth2/token
scopes: {}
authorizationCode:
authorizationUrl: https://api.gettyimages.com/v4/oauth2/auth
tokenUrl: https://api.gettyimages.com/v4/oauth2/token
refreshUrl: https://api.gettyimages.com/v4/oauth2/token
scopes: {}