diff --git a/specification/paths.json b/specification/paths.json index 2480eff5..ab681a35 100644 --- a/specification/paths.json +++ b/specification/paths.json @@ -398,12 +398,6 @@ "/zones/{zone_id}": { "$ref": "./paths/Zones-zone_id.json" }, - "/analytics/on-time-delivery/{interval}": { - "$ref": "./paths/Analytics-on-time-delivery.json" - }, - "/analytics/volume/{group_by}/{interval}": { - "$ref": "./paths/Analytics-volume.json" - }, "/add-shipments-to-collection": { "$ref": "./paths/AddShipmentsToCollection.json" }, diff --git a/specification/paths/Analytics-on-time-delivery.json b/specification/paths/Analytics-on-time-delivery.json deleted file mode 100644 index e7e66f31..00000000 --- a/specification/paths/Analytics-on-time-delivery.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "get": { - "tags": [ - "Analytics" - ], - "security": [ - { - "OAuth2": [ - "shipments.manage" - ] - } - ], - "summary": "Get analytics report for delivered shipments on time.", - "description": "This endpoint retrieves the rate by which shipments are successfully delivered on time on intervals.", - "parameters": [ - { - "name": "interval", - "in": "path", - "description": "Interval by which to arrange the dataset.", - "required": true, - "schema": { - "type": "string", - "enum": [ - "month" - ] - } - }, - { - "name": "filter[date_from]", - "in": "query", - "description": "Date string in ISO 8601 date format (YYYY-MM-DD). Only shipments created at >= this date will be in the response.", - "schema": { - "type": "string" - } - }, - { - "name": "filter[date_to]", - "in": "query", - "description": "Date string in ISO 8601 date format (YYYY-MM-DD). Only shipments created at <= this date will be in the response.", - "schema": { - "type": "string" - } - }, - { - "$ref": "#/components/parameters/query-filter-shop" - }, - { - "$ref": "#/components/parameters/query-filter-organization" - }, - { - "$ref": "#/components/parameters/query-filter-broker" - }, - { - "$ref": "#/components/parameters/query-filter-carrier" - }, - { - "name": "filter[service_code]", - "in": "query", - "description": "Comma separated string of service codes to filter by. Only shipments with a service that corresponds with one of the service codes will be in the response.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Retrieved the analytics data in timeseries.", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/components/schemas/Analytics" - } - } - } - } - } - } - } - } -} diff --git a/specification/paths/Analytics-volume.json b/specification/paths/Analytics-volume.json deleted file mode 100644 index 6a22897b..00000000 --- a/specification/paths/Analytics-volume.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "get": { - "tags": [ - "Analytics" - ], - "security": [ - { - "OAuth2": [ - "shipments.manage" - ] - } - ], - "summary": "Get analytics report for volumes per carrier.", - "description": "This endpoint retrieves the amount of shipments delivered organized by carrier over time.", - "parameters": [ - { - "name": "group_by", - "in": "path", - "description": "Field by which to group data series by. Set `combined` to ignore grouping.", - "required": true, - "schema": { - "type": "string", - "enum": [ - "carrier", - "service", - "combined" - ] - } - }, - { - "name": "interval", - "in": "path", - "description": "Interval by which to arrange the dataset.", - "required": true, - "schema": { - "type": "string", - "enum": [ - "month" - ] - } - }, - { - "$ref": "#/components/parameters/query-shipments-filter-search" - }, - { - "$ref": "#/components/parameters/query-shipments-filter-description" - }, - { - "$ref": "#/components/parameters/query-shipments-filter-customer_reference" - }, - { - "$ref": "#/components/parameters/query-shipments-filter-date_from" - }, - { - "$ref": "#/components/parameters/query-shipments-filter-date_to" - }, - { - "$ref": "#/components/parameters/query-filter-created_at-date_from" - }, - { - "$ref": "#/components/parameters/query-filter-created_at-date_to" - }, - { - "$ref": "#/components/parameters/query-shipments-filter-register_at-date_from" - }, - { - "$ref": "#/components/parameters/query-shipments-filter-register_at-date_to" - }, - { - "$ref": "#/components/parameters/query-filter-shop" - }, - { - "$ref": "#/components/parameters/query-filter-organization" - }, - { - "$ref": "#/components/parameters/query-filter-broker" - }, - { - "$ref": "#/components/parameters/query-filter-carrier" - }, - { - "$ref": "#/components/parameters/query-shipments-filter-current_status_code" - }, - { - "$ref": "#/components/parameters/query-shipments-filter-service_code" - }, - { - "$ref": "#/components/parameters/query-shipments-filter-recipient_address-country_code" - }, - { - "$ref": "#/components/parameters/query-shipments-filter-sender_address-country_code" - }, - { - "$ref": "#/components/parameters/query-shipments-filter-consolidation_shipment" - } - ], - "responses": { - "200": { - "description": "Retrieved the analytics data in timeseries.", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/components/schemas/Analytics" - } - } - } - } - } - } - } - } -} diff --git a/specification/schemas.json b/specification/schemas.json index fbb23cf2..d8d83349 100644 --- a/specification/schemas.json +++ b/specification/schemas.json @@ -764,9 +764,6 @@ "Weight": { "$ref": "./schemas/Weight.json" }, - "Analytics": { - "$ref": "./schemas/Analytics.json" - }, "TaxIdentificationNumber": { "$ref": "./schemas/organizations/TaxIdentificationNumber.json" }, diff --git a/specification/schemas/Analytics.json b/specification/schemas/Analytics.json deleted file mode 100644 index 089321a0..00000000 --- a/specification/schemas/Analytics.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "type": "object", - "additionalProperties": false, - "properties": { - "unit_type": { - "type": "string", - "example": "percentage", - "enum": [ - "amount", - "percentage" - ] - }, - "labels": { - "type": "array", - "description": "List of all chart labels on the X axis", - "items": { - "type": "string", - "example": "January" - } - }, - "datasets": { - "type": "array", - "items": { - "type": "object", - "properties": { - "label": { - "type": "string", - "example": "Delivery < 1 day" - }, - "data": { - "type": "array", - "items": { - "type": "number", - "format": "float", - "example": 93.56 - } - } - } - } - } - } -} diff --git a/specification/tags.json b/specification/tags.json index 12ded8c1..67b6a62c 100644 --- a/specification/tags.json +++ b/specification/tags.json @@ -211,8 +211,5 @@ }, { "name": "Zones" - }, - { - "name": "Analytics" } ] diff --git a/src/myparcelcom.js b/src/myparcelcom.js index 738baceb..1931f26f 100644 --- a/src/myparcelcom.js +++ b/src/myparcelcom.js @@ -101,7 +101,6 @@ 'SystemMessages', 'ExportLoginAttempts', 'ReturnReasonsManagement', - 'Analytics', ] for (var i = 0; i < internal.length; i++) { var sections = document.querySelectorAll([