openapi: 3.2.0 info: title: G2 Product Mappings API version: v2 description: '## Rate Limiting Cloudflare limits requests to the G2 API to **100 requests per second** per source IP address. ' servers: - url: https://{defaultHost} variables: defaultHost: default: data.g2.com tags: - name: Product Mappings paths: /api/v2/product_mappings: get: summary: List of product mappings operationId: getProductMappings tags: - Product Mappings description: '**No scope required.** ' security: - AccountAPIToken: [] parameters: - name: page[size] in: query required: false description: 'Number of records per page (default: 25, max: 250)' schema: type: integer minimum: 1 maximum: 250 default: 25 - name: page[after] in: query required: false description: Cursor for fetching the next page of results schema: type: string - name: page[before] in: query required: false description: Cursor for fetching the previous page of results schema: type: string - name: filter[product_id] description: G2 product ID in: query schema: type: string - name: filter[external_id] description: Non-G2 ID mapped to the G2 product in: query schema: type: string - name: filter[deleted_at_lt] schema: type: string format: date-time description: Max deleted_at value (RFC3339 format) in: query - name: filter[deleted_at_gt] schema: type: string format: date-time description: Min deleted_at value (RFC3339 format) in: query - name: filter[created_at_gt] schema: type: string format: date-time description: Min created_at value (RFC3339 format) in: query - name: filter[created_at_lt] schema: type: string format: date-time description: Max created_at value (RFC3339 format) in: query - name: filter[updated_at_gt] schema: type: string format: date-time description: Min updated_at value (RFC3339 format) in: query - name: filter[updated_at_lt] schema: type: string format: date-time description: Max updated_at value (RFC3339 format) in: query - name: fields[product_mappings] in: query explode: false description: Comma separated list of fields for product_mappings to include in response schema: type: array items: type: string enum: - created_at - updated_at - match_score - external_id - product_id - product_name - partner_product_name - deleted_at responses: '401': description: Unauthenticated content: application/vnd.api+json: example: errors: - status: '401' title: Bad Credentials schema: $ref: '#/components/schemas/Errors' '200': description: With all fields and relationships content: application/vnd.api+json: example: data: [] links: self: http://data.example.com/api/v2/product_mappings?filter%5Bproduct_id%5D=&filter%5Bexternal_id%5D=&filter%5Bdeleted_at_lt%5D=&filter%5Bdeleted_at_gt%5D=&filter%5Bcreated_at_gt%5D=&filter%5Bcreated_at_lt%5D=&filter%5Bupdated_at_gt%5D=&filter%5Bupdated_at_lt%5D=&fields%5Bproduct_mappings%5D=created_at,updated_at,match_score,external_id,product_id,product_name,partner_product_name,deleted_at next: null prev: null meta: record_count: 0 schema: type: object required: - data - links properties: data: type: array items: type: object properties: id: type: string type: type: string attributes: type: object properties: created_at: type: string updated_at: type: string match_score: type: number external_id: type: string product_id: type: string product_name: type: string partner_product_name: type: - string - 'null' deleted_at: type: - string - 'null' required: - id - type - attributes included: $ref: '#/components/schemas/included' links: $ref: '#/components/schemas/cursor_pagination' post: summary: Create a product mapping operationId: createProductMapping tags: - Product Mappings description: '**No scope required.** ' security: - AccountAPIToken: [] parameters: [] responses: '401': description: Unauthenticated content: application/vnd.api+json: example: errors: - status: '401' title: Bad Credentials schema: $ref: '#/components/schemas/Errors' '201': description: Product mapping created successfully content: application/vnd.api+json: example: data: id: 98323a15-6439-4490-a271-98fa177f7158 type: product_mappings attributes: created_at: '2022-01-01T00:00:00.000-06:00' updated_at: '2022-01-01T00:00:00.000-06:00' match_score: 0.95 match_type: manual external_id: ext123 product_id: 89368b1f-c347-4a44-8599-000000000002 product_name: test product 202 partner_product_name: Sample Partner Product deleted_at: null requestBody: content: application/vnd.api+json: schema: type: object properties: data: type: object required: - type - attributes properties: type: type: string enum: - product_mappings attributes: type: object required: - external_id - product_id properties: external_id: type: string product_id: type: string match_score: type: - number - 'null' partner_product_name: type: - string - 'null' /api/v2/product_mappings/{id}: parameters: - name: id in: path description: Product mapping ID required: true schema: type: string put: summary: Update a product mapping operationId: updateProductMapping tags: - Product Mappings description: '**No scope required.** ' security: - AccountAPIToken: [] parameters: [] responses: '200': description: Product mapping updated successfully content: application/vnd.api+json: example: data: id: 89368b1f-c347-4a44-8599-000000000001 type: product_mappings attributes: created_at: '2022-01-01T00:00:00.000-06:00' updated_at: '2022-01-01T00:00:00.000-06:00' match_score: 0.85 match_type: manual external_id: updated_ext123 product_id: 89368b1f-c347-4a44-8599-000000000002 product_name: test product 204 partner_product_name: Updated Partner Product deleted_at: null requestBody: content: application/vnd.api+json: schema: type: object properties: data: type: object required: - type - id - attributes properties: type: type: string enum: - product_mappings id: type: string attributes: type: object properties: external_id: type: - string - 'null' product_id: type: - string - 'null' match_score: type: - number - 'null' partner_product_name: type: - string - 'null' components: schemas: Errors: type: object properties: errors: type: array items: type: object properties: status: type: string title: type: string links: type: - object - 'null' source: type: - object - 'null' cursor_pagination: type: object properties: next: type: - string - 'null' prev: type: - string - 'null' self: type: - string - 'null' included: type: array items: type: object properties: id: type: string type: type: string attributes: type: object relationships: type: object securitySchemes: AccountAPIToken: type: http scheme: bearer G2OAuth: type: oauth2 flows: authorizationCode: tokenUrl: https://www.g2.com/oauth/token authorizationUrl: https://www.g2.com/oauth/authorize scopes: openid: OpenID Connect default scope profile: Profile information on current user data_subscriptions.read: Read Data Subscription records data_subscriptions.read_write: Modify Data Subscription records partner:partner-id.read: Access records created in Partner realm performance_analytics.read: Read Performance Analytics data