diff --git a/schemas/reports/endUserDataReport.json b/schemas/reports/endUserDataReport.json new file mode 100644 index 0000000..3ff4444 --- /dev/null +++ b/schemas/reports/endUserDataReport.json @@ -0,0 +1,436 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "type": "object", + "description": "Provides end user (customer) data to DE, FR, IT, ES, NL, PL, SE and BE (EU-8) Selling Partners. This data contains customer personal data, including contact information, page view (glance view), and order data for customers who have elected to share this data with specific sellers. This data is accessible across various reporting periods, including DAY, WEEK and MONTH. Developers can choose to define start and end dates, along with the desired reporting period for data retrieval and aggregation. Please note that the report will not generate any data if no customers have elected to share their data.", + "examples": [ + { + "reportSpecification": { + "dataStartTime": "2023-09-10", + "dataEndTime": "2023-09-16", + "reportType": "END_USER_DATA_REPORT", + "reportOptions": { + "reportPeriod": "WEEK" + }, + "marketplaceIds": [ + "A1PA6795UKMFR9", "APJ6JRA9NG5V4" + ] + }, + "endUserData": [ + { + "fullName": "John Doe", + "mailingAddress": { + "addressLine1": "ABC Blvd", + "addressLine2": "Apartment 000", + "addressLine3": "", + "city": "Berlin", + "stateOrRegion": "Berlin", + "districtOrCounty": "", + "postalCode": "10115", + "countryCode": "DE" + }, + "primaryEmail": "jdoe@xyz.com", + "asinMetrics": [ + { + "startDate": "2023-09-10", + "endDate": "2023-09-16", + "marketplaceId": "A1PA6795UKMFR9", + "asin": "B00EZ1IGCO", + "pageViews": 12352, + "gms": 145.2, + "currencyCode": "EUR" + }, + { + "startDate": "2023-09-10", + "endDate": "2023-09-16", + "marketplaceId": "A1PA6795UKMFR9", + "asin": "A0DEZ1IKDB", + "pageViews": 432, + "gms": 98.8, + "currencyCode": "EUR" + } + ] + }, + { + "fullName": "Oliver Smith", + "mailingAddress": { + "addressLine1": "000 XYZ Street", + "addressLine2": "", + "addressLine3": "", + "city": "Rome", + "stateOrRegion": "Lazio", + "districtOrCounty": "", + "postalCode": "39100", + "countryCode": "IT" + }, + "primaryEmail": "osmith@xyz.com", + "asinMetrics": [ + { + "startDate": "2023-09-10", + "endDate": "2023-09-16", + "marketplaceId": "APJ6JRA9NG5V4", + "asin": "B00EZ1IGCO", + "pageViews": 12352, + "gms": 145.2, + "currencyCode": "EUR" + }, + { + "startDate": "2023-09-10", + "endDate": "2023-09-16", + "marketplaceId": "APJ6JRA9NG5V4", + "asin": "A0DEZ1IKDB", + "pageViews": 432, + "gms": 98.8, + "currencyCode": "EUR" + } + ] + } + ] + }, + { + "reportSpecification": { + "reportType": "END_USER_DATA_REPORT", + "marketplaceIds": [ + "A1PA6795UKMFR9" + ], + "dataStartTime": "2022-08-15", + "dataEndTime": "2023-10-05" + }, + "endUserData": [ + { + "fullName": "John Doe", + "mailingAddress": { + "addressLine1": "ABC Blvd", + "addressLine2": "Apartment 000", + "addressLine3": "", + "city": "Berlin", + "stateOrRegion": "Berlin", + "districtOrCounty": "", + "postalCode": "10115", + "countryCode": "DE" + }, + "primaryEmail": "jdoe@xyz.com", + "asinMetrics": [ + { + "startDate": "2023-09-01", + "endDate": "2023-09-30", + "marketplaceId": "A1PA6795UKMFR9", + "asin": "B00EZ1IGCO", + "pageViews": 1256, + "gms": 125.2, + "currencyCode": "EUR" + }, + { + "startDate": "2023-08-01", + "endDate": "2023-08-31", + "marketplaceId": "A1PA6795UKMFR9", + "asin": "B00EZ1IGCO", + "pageViews": 12352, + "gms": 145.2, + "currencyCode": "EUR" + }, + { + "startDate": "2023-07-01", + "endDate": "2023-07-31", + "marketplaceId": "A1PA6795UKMFR9", + "asin": "B00EZ1IGCO", + "pageViews": 12352, + "gms": 145.2, + "currencyCode": "EUR" + }, + { + "startDate": "2023-06-01", + "endDate": "2023-06-30", + "marketplaceId": "A1PA6795UKMFR9", + "asin": "B00EZ1IGCO", + "pageViews": 12352, + "gms": 145.2, + "currencyCode": "EUR" + }, + { + "startDate": "2023-05-01", + "endDate": "2023-05-31", + "marketplaceId": "A1PA6795UKMFR9", + "asin": "B00EZ1IGCO", + "pageViews": 12352, + "gms": 145.2, + "currencyCode": "EUR" + }, + { + "startDate": "2023-04-01", + "endDate": "2023-04-30", + "marketplaceId": "A1PA6795UKMFR9", + "asin": "B00EZ1IGCO", + "pageViews": 12352, + "gms": 145.2, + "currencyCode": "EUR" + }, + { + "startDate": "2023-03-01", + "endDate": "2023-03-31", + "marketplaceId": "A1PA6795UKMFR9", + "asin": "B00EZ1IGCO", + "pageViews": 12352, + "gms": 145.2, + "currencyCode": "EUR" + }, + { + "startDate": "2023-02-01", + "endDate": "2023-02-28", + "marketplaceId": "A1PA6795UKMFR9", + "asin": "B00EZ1IGCO", + "pageViews": 12352, + "gms": 145.2, + "currencyCode": "EUR" + }, + { + "startDate": "2023-01-01", + "endDate": "2023-01-31", + "marketplaceId": "A1PA6795UKMFR9", + "asin": "B00EZ1IGCO", + "pageViews": 12352, + "gms": 145.2, + "currencyCode": "EUR" + }, + { + "startDate": "2022-12-01", + "endDate": "2022-12-31", + "marketplaceId": "A1PA6795UKMFR9", + "asin": "B00EZ1IGCO", + "pageViews": 12352, + "gms": 145.2, + "currencyCode": "EUR" + }, + { + "startDate": "2022-11-01", + "endDate": "2022-11-30", + "marketplaceId": "A1PA6795UKMFR9", + "asin": "B00EZ1IGCO", + "pageViews": 12352, + "gms": 145.2, + "currencyCode": "EUR" + }, + { + "startDate": "2022-10-01", + "endDate": "2022-10-31", + "marketplaceId": "A1PA6795UKMFR9", + "asin": "B00EZ1IGCO", + "pageViews": 12352, + "gms": 145.2, + "currencyCode": "EUR" + }, + { + "startDate": "2022-09-01", + "endDate": "2022-09-30", + "marketplaceId": "A1PA6795UKMFR9", + "asin": "B00EZ1IGCO", + "pageViews": 12352, + "gms": 145.2, + "currencyCode": "EUR" + } + ] + } + ] + } + ], + "required": [ + "reportSpecification", + "endUserData" + ], + "properties": { + "reportSpecification": { + "type": "object", + "description": "Summarizes the report request.", + "required": [ + "reportType", + "marketplaceIds", + "dataStartTime", + "dataEndTime" + ], + "properties": { + "reportType": { + "type": "string", + "description": "The report type." + }, + "reportOptions": { + "type": "object", + "description": "Used to specify the report period.", + "properties": { + "reportPeriod": { + "type": "string", + "description": "The granularity of the data in the report. Valid values are: DAY, WEEK, and MONTH. If no granularity is specified, reportPeriod defaults to MONTH.", + "enum": [ + "DAY", + "WEEK", + "MONTH" + ] + } + } + }, + "dataStartTime": { + "type": "string", + "format": "date", + "description": "Determines the start date of the report - the time component is ignored. If the provided start date occurs mid-week or mid-month, the following Sunday for weekly reporting periods or the first day of the next month for monthly reporting periods will be used instead.", + "examples": [ + "2023-06-06" + ] + }, + "dataEndTime": { + "type": "string", + "format": "date", + "description": "Determines the end date of the report - the time component is ignored. If the provided end date occurs mid-week or mid-month, the preceding Saturday for weekly reporting periods or the last day of the previous month for monthly reporting periods will be used instead. Additionally if the end date differs from the start date by more than 365 days, it will be adjusted to the closest end date with a maximum 365 day difference based on the selected reporting period.", + "examples": [ + "2021-06-19" + ] + }, + "marketplaceIds": { + "type": "array", + "description": "Any of the EU(8) marketplaces. DE, FR, IT, ES, NL, PL, SE and BE", + "items": { + "type": "string", + "description": "Any EU(8) Marketplace ID. DE, FR, IT, ES, NL, PL, SE and BE. The ID for the marketplace can be found on the SP-API documentation. - https://developer-docs.amazon.com/sp-api/docs/marketplace-ids" + } + } + } + }, + "endUserData": { + "type": "array", + "description": "A list of consented end users (buyers) and their data.", + "items": { + "$ref": "#/definitions/EndUserData" + } + } + }, + "definitions": { + "EndUserData": { + "type": "object", + "description": "Contains end user contact information, page view and GMS metrics.", + "required": [ + "fullName", + "mailingAddress", + "primaryEmail", + "asinMetrics" + ], + "properties": { + "fullName": { + "type": "string", + "description": "Full Name of the end user." + }, + "mailingAddress": { + "type": "object", + "description": "Mailing address of the end user.", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address." + }, + "addressLine2": { + "type": "string", + "description": "Additional address." + }, + "addressLine3": { + "type": "string", + "description": "Additional address." + }, + "city": { + "type": "string", + "description": "City." + }, + "stateOrRegion": { + "type": "string", + "description": "State or Region." + }, + "districtOrCounty": { + "type": "string", + "description": "District or County." + }, + "postalCode": { + "type": "string", + "description": "Postal code." + }, + "countryCode": { + "type": "string", + "description": "The two letter ISO 3166-1 alpha-2 country code.", + "examples": ["IT", "DE", "FR"] + } + } + }, + "primaryEmail": { + "type": "string", + "description": "Primary email of the end user." + }, + "asinMetrics": { + "type": "array", + "description": "A list of Asin Page View and GMS metrics of an end user.", + "items": { + "$ref": "#/definitions/AsinMetrics" + } + } + } + }, + "AsinMetrics": { + "type": "object", + "description": "Page view and GMS metrics of the end user.", + "required": [ + "startDate", + "endDate", + "marketplaceId", + "asin" + ], + "properties": { + "startDate": { + "type": "string", + "format": "date", + "description": "Start date of the aggregation window.", + "examples": [ + "2023-01-16" + ] + }, + "endDate": { + "type": "string", + "format": "date", + "description": "End date of the aggregation window.", + "examples": [ + "2023-01-23" + ] + }, + "marketplaceId": { + "type": "string", + "description": "Marketplace for which the metrics are provided.", + "examples": [ + "A1PA6795UKMFR9" + ] + }, + "asin": { + "type": "string", + "description": "ASIN for which the metrics are provided. Only ASINs with an active offer from the Seller are included.", + "examples": [ + "B00EZ1IGCO" + ] + }, + "pageViews": { + "type": "integer", + "description": "End user's page views (count) for the ASIN.", + "minimum": 0, + "examples": [ + 12352 + ] + }, + "gms": { + "type": "number", + "description": "End user's GMS for the ASIN. GMS = (Product Price * Quantity) + Shipping + Giftwrap - Returns - Promotional Discounts.", + "minimum": 0, + "examples": [ + 15.23 + ] + }, + "currencyCode": { + "type": "string", + "description": "The ISO 4217 currency code in which GMS is calculated.", + "examples": [ + "EUR" + ] + } + } + } + } +} \ No newline at end of file