diff --git a/docs/api/build/build.yaml b/docs/api/build/build.yaml index ebf88fe..035d50f 100644 --- a/docs/api/build/build.yaml +++ b/docs/api/build/build.yaml @@ -236,7 +236,7 @@ components: type: object properties: status: - type: boolean + type: array example: 'true' PublishRating: type: object @@ -256,7 +256,7 @@ components: type: object properties: status: - type: boolean + type: array example: 'true' ReviseRating: type: object @@ -636,7 +636,8 @@ x-examples: country: code: IND message: - status: true + status: + - true revise: examples: - summary: revise @@ -687,7 +688,8 @@ x-examples: country: code: IND message: - status: true + status: + - true on_query: examples: - summary: on_query @@ -754,7 +756,7 @@ x-attributes: " entity_id\n": required: true type: String - owner: Publisher + owner: Provider usage: a250a6db99213211f333db7f328085ae277c680d2c7178c4bc65cab9cdab78aa description: >- Provides Persistent ID of the seller / entity, where this is @@ -765,7 +767,7 @@ x-attributes: " entity_name\n": required: false type: String - owner: Publisher + owner: Provider usage: Gupta krishna Stores description: >- Name of the seller (note, uniqueness is determined by @@ -773,7 +775,7 @@ x-attributes: " rating_type\n": required: true type: ENUM - owner: Publisher + owner: Provider usage: Overall description: >- What is rated in this event: overall experience or just the @@ -781,13 +783,13 @@ x-attributes: " count_of_txn\n": required: true type: Integer - owner: Publisher + owner: Provider usage: 100 description: total number of rating transactions " total_rating\n": required: true type: Number - owner: Publisher + owner: Provider usage: 200 description: >- total rating value (each rating transaction is done on the scale @@ -798,31 +800,31 @@ x-attributes: code: required: mandatory type: string - owner: Publisher + owner: Provider usage: IND description: Describes country code as per ISO 3166-1 and ISO 3166-2 format timestamp: required: mandatory type: string - owner: Publisher + owner: Provider usage: '2023-03-23T04:41:16Z' description: Describes tme of request generation in RFC3339 format publisher_id: required: mandatory type: string - owner: Publisher + owner: Provider usage: api.example-publisher.com description: Describes subscriber ID of the Publisher transaction_id: required: mandatory type: string - owner: Publisher + owner: Provider usage: 6743e9e2 description: Describes a unique value which persists across all API calls message_id: required: mandatory type: string - owner: Publisher + owner: Provider usage: 13ba8018f176 description: >- Describes a unique value which persists during a request / @@ -830,7 +832,7 @@ x-attributes: version: required: mandatory type: integer - owner: Publisher + owner: Provider usage: 1.0.0 description: >- Describes the version of transaction protocol being used by the @@ -838,7 +840,7 @@ x-attributes: action: required: mandatory type: string - owner: Publisher + owner: Provider usage: publish description: >- Describes the method being called by the sender and executed at @@ -846,7 +848,7 @@ x-attributes: publisher_uri: required: mandatory type: string - owner: Publisher + owner: Provider usage: https://api.example-publisher.com/pilot/rating/v1 description: >- Describes subscriber URL of the Publisher for accepting requests @@ -854,7 +856,7 @@ x-attributes: ttl: required: mandatory type: string - owner: Publisher + owner: Provider usage: PT30S description: >- Describes the duration in ISO8601 format after timestamp for which @@ -862,7 +864,7 @@ x-attributes: provider_uri: required: mandatory type: string - owner: Publisher + owner: Provider usage: https://api.example-provider.com/pilot/rating/v1 description: >- Describes subscriber URL of the Provider for accepting callbacks @@ -870,7 +872,7 @@ x-attributes: provider_id: required: mandatory type: string - owner: Publisher + owner: Provider usage: api.example-provider.com description: Describes subscriber ID of the Provider on_publish: @@ -968,7 +970,7 @@ x-attributes: " entity_id\n": required: true type: String - owner: Publisher + owner: Provider usage: a250a6db99213211f333db7f328085ae277c680d2c7178c4bc65cab9cdab78aa description: >- Provides Persistent ID of the seller / entity, where this is @@ -979,7 +981,7 @@ x-attributes: " rating_type\n": required: true type: ENUM - owner: Publisher + owner: Provider usage: Overall description: >- What is revised in this event: overall experience or just the @@ -987,13 +989,13 @@ x-attributes: " count_of_txn\n": required: true type: Integer - owner: Publisher + owner: Provider usage: 100 description: total number of rating transactions " total_rating\n": required: true type: Number - owner: Publisher + owner: Provider usage: 200 description: >- total rating value (each rating transaction is done on the scale @@ -1004,31 +1006,31 @@ x-attributes: code: required: mandatory type: string - owner: Publisher + owner: Provider usage: IND description: Describes country code as per ISO 3166-1 and ISO 3166-2 format timestamp: required: mandatory type: string - owner: Publisher + owner: Provider usage: '2023-03-23T04:41:16Z' description: Describes tme of request generation in RFC3339 format publisher_id: required: mandatory type: string - owner: Publisher + owner: Provider usage: api.example-publisher.com description: Describes subscriber ID of the Publisher transaction_id: required: mandatory type: string - owner: Publisher + owner: Provider usage: 6743e9e2 description: Describes a unique value which persists across all API calls message_id: required: mandatory type: string - owner: Publisher + owner: Provider usage: 13ba8018f176 description: >- Describes a unique value which persists during a request / @@ -1036,7 +1038,7 @@ x-attributes: version: required: mandatory type: integer - owner: Publisher + owner: Provider usage: 1.0.0 description: >- Describes the version of transaction protocol being used by the @@ -1044,7 +1046,7 @@ x-attributes: action: required: mandatory type: string - owner: Publisher + owner: Provider usage: revise description: >- Describes the method being called by the sender and executed at @@ -1052,7 +1054,7 @@ x-attributes: publisher_uri: required: mandatory type: string - owner: Publisher + owner: Provider usage: https://api.example-publisher.com/pilot/rating/v1 description: >- Describes subscriber URL of the Publisher for accepting requests @@ -1060,7 +1062,7 @@ x-attributes: ttl: required: mandatory type: string - owner: Publisher + owner: Provider usage: PT30S description: >- Describes the duration in ISO8601 format after timestamp for which @@ -1068,7 +1070,7 @@ x-attributes: provider_uri: required: mandatory type: string - owner: Publisher + owner: Provider usage: https://api.example-provider.com/pilot/rating/v1 description: >- Describes subscriber URL of the Provider for accepting callbacks @@ -1076,7 +1078,7 @@ x-attributes: provider_id: required: mandatory type: string - owner: Publisher + owner: Provider usage: api.example-provider.com description: Describes subscriber ID of the Provider on_revise: @@ -1174,7 +1176,7 @@ x-attributes: "entity_id\n": required: true type: String - owner: Publisher + owner: Provider usage: a250a6db99213211f333db7f328085ae277c680d2c7178c4bc65cab9cdab78aa description: >- Provides Persistent ID of the seller / entity, where this is @@ -1185,7 +1187,7 @@ x-attributes: " rating_type\n\n": required: true type: Enum - owner: Publisher + owner: Provider usage: Overall description: Describes the type of rating like overall or just the delivery context: @@ -1194,31 +1196,31 @@ x-attributes: code: required: mandatory type: string - owner: Publisher + owner: Provider usage: IND description: Describes country code as per ISO 3166-1 and ISO 3166-2 format timestamp: required: mandatory type: string - owner: Publisher + owner: Provider usage: '2023-03-23T04:41:16Z' description: Describes tme of request generation in RFC3339 format publisher_id: required: mandatory type: string - owner: Publisher + owner: Provider usage: api.example-publisher.com description: Describes subscriber ID of the Publisher transaction_id: required: mandatory type: string - owner: Publisher + owner: Provider usage: 6743e9e2 description: Describes a unique value which persists across all API calls message_id: required: mandatory type: string - owner: Publisher + owner: Provider usage: 13ba8018f176 description: >- Describes a unique value which persists during a request / @@ -1226,7 +1228,7 @@ x-attributes: version: required: mandatory type: integer - owner: Publisher + owner: Provider usage: 1.0.0 description: >- Describes the version of transaction protocol being used by the @@ -1234,7 +1236,7 @@ x-attributes: action: required: mandatory type: string - owner: Publisher + owner: Provider usage: query description: >- Describes the method being called by the sender and executed at @@ -1242,7 +1244,7 @@ x-attributes: publisher_uri: required: mandatory type: string - owner: Publisher + owner: Provider usage: https://api.example-publisher.com/pilot/rating/v1 description: >- Describes subscriber URL of the Publisher for accepting requests @@ -1250,7 +1252,7 @@ x-attributes: ttl: required: mandatory type: string - owner: Publisher + owner: Provider usage: PT30S description: >- Describes the duration in ISO8601 format after timestamp for which @@ -1258,7 +1260,7 @@ x-attributes: provider_uri: required: mandatory type: string - owner: Publisher + owner: Provider usage: https://api.example-provider.com/pilot/rating/v1 description: >- Describes subscriber URL of the Provider for accepting callbacks @@ -1266,7 +1268,7 @@ x-attributes: provider_id: required: mandatory type: string - owner: Publisher + owner: Provider usage: api.example-provider.com description: Describes subscriber ID of the Provider on_query: diff --git a/docs/api/components/attributes/score/index.yaml b/docs/api/components/attributes/score/index.yaml index 4ade090..1a93694 100644 --- a/docs/api/components/attributes/score/index.yaml +++ b/docs/api/components/attributes/score/index.yaml @@ -4,7 +4,7 @@ publish: " entity_id\n": required: true type: String - owner: Publisher + owner: Provider usage: a250a6db99213211f333db7f328085ae277c680d2c7178c4bc65cab9cdab78aa description: >- Provides Persistent ID of the seller / entity, where this is generated @@ -15,7 +15,7 @@ publish: " entity_name\n": required: false type: String - owner: Publisher + owner: Provider usage: Gupta krishna Stores description: >- Name of the seller (note, uniqueness is determined by `entity_id` @@ -23,19 +23,19 @@ publish: " rating_type\n": required: true type: ENUM - owner: Publisher + owner: Provider usage: Overall description: 'What is rated in this event: overall experience or just the delivery' " count_of_txn\n": required: true type: Integer - owner: Publisher + owner: Provider usage: 100 description: total number of rating transactions " total_rating\n": required: true type: Number - owner: Publisher + owner: Provider usage: 200 description: >- total rating value (each rating transaction is done on the scale of @@ -46,31 +46,31 @@ publish: code: required: mandatory type: string - owner: Publisher + owner: Provider usage: IND description: Describes country code as per ISO 3166-1 and ISO 3166-2 format timestamp: required: mandatory type: string - owner: Publisher + owner: Provider usage: '2023-03-23T04:41:16Z' description: Describes tme of request generation in RFC3339 format publisher_id: required: mandatory type: string - owner: Publisher + owner: Provider usage: api.example-publisher.com description: Describes subscriber ID of the Publisher transaction_id: required: mandatory type: string - owner: Publisher + owner: Provider usage: 6743e9e2 description: Describes a unique value which persists across all API calls message_id: required: mandatory type: string - owner: Publisher + owner: Provider usage: 13ba8018f176 description: >- Describes a unique value which persists during a request / callback @@ -78,13 +78,13 @@ publish: version: required: mandatory type: integer - owner: Publisher + owner: Provider usage: 1.0.0 description: Describes the version of transaction protocol being used by the sender. action: required: mandatory type: string - owner: Publisher + owner: Provider usage: publish description: >- Describes the method being called by the sender and executed at the @@ -92,7 +92,7 @@ publish: publisher_uri: required: mandatory type: string - owner: Publisher + owner: Provider usage: https://api.example-publisher.com/pilot/rating/v1 description: >- Describes subscriber URL of the Publisher for accepting requests from @@ -100,7 +100,7 @@ publish: ttl: required: mandatory type: string - owner: Publisher + owner: Provider usage: PT30S description: >- Describes the duration in ISO8601 format after timestamp for which this @@ -108,7 +108,7 @@ publish: provider_uri: required: mandatory type: string - owner: Publisher + owner: Provider usage: https://api.example-provider.com/pilot/rating/v1 description: >- Describes subscriber URL of the Provider for accepting callbacks from @@ -116,7 +116,7 @@ publish: provider_id: required: mandatory type: string - owner: Publisher + owner: Provider usage: api.example-provider.com description: Describes subscriber ID of the Provider on_publish: @@ -212,7 +212,7 @@ revise: " entity_id\n": required: true type: String - owner: Publisher + owner: Provider usage: a250a6db99213211f333db7f328085ae277c680d2c7178c4bc65cab9cdab78aa description: >- Provides Persistent ID of the seller / entity, where this is generated @@ -223,19 +223,19 @@ revise: " rating_type\n": required: true type: ENUM - owner: Publisher + owner: Provider usage: Overall description: 'What is revised in this event: overall experience or just the delivery' " count_of_txn\n": required: true type: Integer - owner: Publisher + owner: Provider usage: 100 description: total number of rating transactions " total_rating\n": required: true type: Number - owner: Publisher + owner: Provider usage: 200 description: >- total rating value (each rating transaction is done on the scale of @@ -246,31 +246,31 @@ revise: code: required: mandatory type: string - owner: Publisher + owner: Provider usage: IND description: Describes country code as per ISO 3166-1 and ISO 3166-2 format timestamp: required: mandatory type: string - owner: Publisher + owner: Provider usage: '2023-03-23T04:41:16Z' description: Describes tme of request generation in RFC3339 format publisher_id: required: mandatory type: string - owner: Publisher + owner: Provider usage: api.example-publisher.com description: Describes subscriber ID of the Publisher transaction_id: required: mandatory type: string - owner: Publisher + owner: Provider usage: 6743e9e2 description: Describes a unique value which persists across all API calls message_id: required: mandatory type: string - owner: Publisher + owner: Provider usage: 13ba8018f176 description: >- Describes a unique value which persists during a request / callback @@ -278,13 +278,13 @@ revise: version: required: mandatory type: integer - owner: Publisher + owner: Provider usage: 1.0.0 description: Describes the version of transaction protocol being used by the sender. action: required: mandatory type: string - owner: Publisher + owner: Provider usage: revise description: >- Describes the method being called by the sender and executed at the @@ -292,7 +292,7 @@ revise: publisher_uri: required: mandatory type: string - owner: Publisher + owner: Provider usage: https://api.example-publisher.com/pilot/rating/v1 description: >- Describes subscriber URL of the Publisher for accepting requests from @@ -300,7 +300,7 @@ revise: ttl: required: mandatory type: string - owner: Publisher + owner: Provider usage: PT30S description: >- Describes the duration in ISO8601 format after timestamp for which this @@ -308,7 +308,7 @@ revise: provider_uri: required: mandatory type: string - owner: Publisher + owner: Provider usage: https://api.example-provider.com/pilot/rating/v1 description: >- Describes subscriber URL of the Provider for accepting callbacks from @@ -316,7 +316,7 @@ revise: provider_id: required: mandatory type: string - owner: Publisher + owner: Provider usage: api.example-provider.com description: Describes subscriber ID of the Provider on_revise: @@ -412,7 +412,7 @@ query: "entity_id\n": required: true type: String - owner: Publisher + owner: Provider usage: a250a6db99213211f333db7f328085ae277c680d2c7178c4bc65cab9cdab78aa description: >- Provides Persistent ID of the seller / entity, where this is generated @@ -423,7 +423,7 @@ query: " rating_type\n\n": required: true type: Enum - owner: Publisher + owner: Provider usage: Overall description: Describes the type of rating like overall or just the delivery context: @@ -432,31 +432,31 @@ query: code: required: mandatory type: string - owner: Publisher + owner: Provider usage: IND description: Describes country code as per ISO 3166-1 and ISO 3166-2 format timestamp: required: mandatory type: string - owner: Publisher + owner: Provider usage: '2023-03-23T04:41:16Z' description: Describes tme of request generation in RFC3339 format publisher_id: required: mandatory type: string - owner: Publisher + owner: Provider usage: api.example-publisher.com description: Describes subscriber ID of the Publisher transaction_id: required: mandatory type: string - owner: Publisher + owner: Provider usage: 6743e9e2 description: Describes a unique value which persists across all API calls message_id: required: mandatory type: string - owner: Publisher + owner: Provider usage: 13ba8018f176 description: >- Describes a unique value which persists during a request / callback @@ -464,13 +464,13 @@ query: version: required: mandatory type: integer - owner: Publisher + owner: Provider usage: 1.0.0 description: Describes the version of transaction protocol being used by the sender. action: required: mandatory type: string - owner: Publisher + owner: Provider usage: query description: >- Describes the method being called by the sender and executed at the @@ -478,7 +478,7 @@ query: publisher_uri: required: mandatory type: string - owner: Publisher + owner: Provider usage: https://api.example-publisher.com/pilot/rating/v1 description: >- Describes subscriber URL of the Publisher for accepting requests from @@ -486,7 +486,7 @@ query: ttl: required: mandatory type: string - owner: Publisher + owner: Provider usage: PT30S description: >- Describes the duration in ISO8601 format after timestamp for which this @@ -494,7 +494,7 @@ query: provider_uri: required: mandatory type: string - owner: Publisher + owner: Provider usage: https://api.example-provider.com/pilot/rating/v1 description: >- Describes subscriber URL of the Provider for accepting callbacks from @@ -502,7 +502,7 @@ query: provider_id: required: mandatory type: string - owner: Publisher + owner: Provider usage: api.example-provider.com description: Describes subscriber ID of the Provider on_query: diff --git a/docs/api/components/examples/score/on_publish/on_publish.yaml b/docs/api/components/examples/score/on_publish/on_publish.yaml index 2cb812b..59aacc1 100644 --- a/docs/api/components/examples/score/on_publish/on_publish.yaml +++ b/docs/api/components/examples/score/on_publish/on_publish.yaml @@ -14,4 +14,4 @@ context: country: code: "IND" message: - status: true + status: [true] diff --git a/docs/api/components/examples/score/on_revise/on_revise.yaml b/docs/api/components/examples/score/on_revise/on_revise.yaml index fc3f9c6..3f6d7b0 100644 --- a/docs/api/components/examples/score/on_revise/on_revise.yaml +++ b/docs/api/components/examples/score/on_revise/on_revise.yaml @@ -14,4 +14,4 @@ context: country: code: "IND" message: - status: true + status: [true] diff --git a/docs/api/components/rating_yaml.yaml b/docs/api/components/rating_yaml.yaml index f39927a..95a8622 100644 --- a/docs/api/components/rating_yaml.yaml +++ b/docs/api/components/rating_yaml.yaml @@ -223,7 +223,7 @@ components: type: "object" properties: status: - type: "boolean" + type: "array" example: "true" PublishRating: @@ -244,7 +244,7 @@ components: type: "object" properties: status: - type: "boolean" + type: "array" example: "true" ReviseRating: type: "object" diff --git a/docs/ui/build.js b/docs/ui/build.js index a84c86d..017ab53 100644 --- a/docs/ui/build.js +++ b/docs/ui/build.js @@ -1 +1 @@ -let build_spec = {"openapi":"3.0.0","info":{"title":"Issue and Grievance Management (IGM) for ONDC","description":"ONDC Issue and Grievance Management (IGM) API Specification","version":"1.0.0"},"security":[{"SubscriberAuth":[]}],"paths":{"/publish":{"post":{"tags":["Provider API"],"description":"Publish the ratings to the chain, for the entity with given transaction / message ID ","operationId":"publishRatings","requestBody":{"description":"Write the ratings to the chain. Notice that this can take 1 or more entries from the NP (Network Participant) and submit it to the API (which inturn will write to the chain).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishRating"}}},"required":"true"},"responses":{"default":{"$ref":"#/components/schemas/DefaultResponse"}}}},"/on_publish":{"post":{"tags":["Publisher API"],"description":"Inform the client about success or failure of the publish rating","operationId":"onPublishRating","requestBody":{"description":"Callback of publish rating operation to the chain. Considering the /publish call will have multiple entries, this can collate all the entries and send the response, upon completion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnPublishRating"}}},"required":"true"},"responses":{"default":{"$ref":"#/components/schemas/DefaultResponse"}}}},"/revise":{"post":{"tags":["Provider API"],"description":"Revise ratings in the chain. This can happen due to 2 reasons. 1 is when the user themself changes the given rating over the period (possible for seller to settle bad rating with the buyer), or some discrepancies are found during the auditing.","operationId":"reviseRatings","requestBody":{"description":"revise the ratings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviseRating"}}},"required":"true"},"responses":{"default":{"$ref":"#/components/schemas/DefaultResponse"}}}},"/on_revise":{"post":{"tags":["Publisher API"],"description":"update the status of the revise operation on the chain.","operationId":"onReviseRating","requestBody":{"description":"update the ratings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnReviseRating"}}},"required":"true"},"responses":{"default":{"$ref":"#/components/schemas/DefaultResponse"}}}},"/query":{"post":{"tags":["Provider API"],"description":"Read aggregate score, read all given entities ratings, more details based on parameters","operationId":"Query","requestBody":{"description":"query the score","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRating"}}},"required":"true"},"responses":{"default":{"$ref":"#/components/schemas/DefaultResponse"}}}},"/on_query":{"post":{"tags":["Publisher API"],"description":"Response / Callback to the query call","operationId":"onQuery","requestBody":{"description":"query the ratings / score","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnQueryRating"}}},"required":"true"},"responses":{"200":{"description":"Aggregated Score details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/200_Res"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"SubscriberAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Signature of message body using Collector or Receiver subscriber's signing public key.

Format:

Authorization : Signature keyId=\"{subscriber_id}|{unique_key_id}|{algorithm}\",algorithm=\"ed25519\",created=\"1606970629\",expires=\"1607030629\",headers=\"(created) (expires) digest\",signature=\"Base64(signing string)\""}},"schemas":{"Error":{"description":"Describes an error object","type":"object","properties":{"type":{"type":"string","enum":["CONTEXT-ERROR","CORE-ERROR","DOMAIN-ERROR","POLICY-ERROR","JSON-SCHEMA-ERROR"]}}},"DefaultResponse":{"description":"Acknowledgement of message received after successful validation of schema and signature","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"ack":{"allOf":[{"$ref":"#/components/schemas/Ack"},{"type":"object"},{"properties":{"status":{"enum":["ACK","NACK"]}}}]}},"required":["ack"]},"error":{"$ref":"#/components/schemas/Error"}},"required":["message"]}}}},"200_Res":{"type":"object","properties":{"ack":{"$ref":"#/components/schemas/Ack"}}},"Ack":{"description":"Describes the acknowledgement sent in response to an API call. If the implementation uses HTTP/S, then Ack must be returned in the same session. Every API call to a BPP must be responded to with an Ack whether the BPP intends to respond with a callback or not. This has one property called `status` that indicates the status of the Acknowledgement.","type":"object","additionalProperties":false,"properties":{"status":{"type":"string","description":"The status of the acknowledgement. If the request passes the validation criteria of the BPP, then this is set to ACK. If a BPP responds with status = `ACK` to a request, it is required to respond with a callback. If the request fails the validation criteria, then this is set to NACK. Additionally, if a BPP does not intend to respond with a callback even after the request meets the validation criteria, it should set this value to `NACK`.","enum":["ACK","NACK"]}}},"Descriptor":{"description":"Physical description of something.","type":"object","additionalProperties":false,"properties":{"name":{"type":"string"},"code":{"type":"string"},"short_desc":{"type":"string"},"long_desc":{"type":"string"},"additional_desc":{"type":"object","additionalProperties":false,"properties":{"url":{"type":"string"},"content_type":{"type":"string","enum":["text/plain","text/html","application/json"]}}}}},"OnPublishResult_20x":{"type":"object","properties":{"status":{"type":"boolean","example":"true"}}},"PublishRating":{"type":"object","properties":{"context":{"$ref":"#/components/schemas/Context"},"message":{"$ref":"#/components/schemas/PublishMessage"}}},"OnPublishRating":{"type":"object","properties":{"context":{"$ref":"#/components/schemas/Context"},"message":{"$ref":"#/components/schemas/OnPublishResult_20x"}}},"OnReviseResult_20x":{"type":"object","properties":{"status":{"type":"boolean","example":"true"}}},"ReviseRating":{"type":"object","properties":{"context":{"$ref":"#/components/schemas/Context"},"message":{"$ref":"#/components/schemas/ReviseMessage"}}},"OnReviseRating":{"type":"object","properties":{"context":{"$ref":"#/components/schemas/Context"},"message":{"$ref":"#/components/schemas/OnReviseResult_20x"}}},"QueryRating":{"type":"object","properties":{"context":{"$ref":"#/components/schemas/Context"},"message":{"$ref":"#/components/schemas/QueryMessage"}}},"QueryMessage":{"type":"object","properties":{"entity_list":{"type":"array","items":{"type":"object","properties":{"entityId":{"type":"string","example":"286cf1b1-3e16-448f-b675-3b232e82174d"},"rating_type":{"type":"string","example":"Overall"}}}}}},"OnQueryRating":{"type":"object","properties":{"context":{"$ref":"#/components/schemas/Context"},"message":{"type":"object","properties":{"scores":{"type":"array","items":{"type":"object","properties":{"entityId":{"type":"string","example":"286cf1b1-3e16-448f-b675-3b232e82174d"},"entity_name":{"type":"string"},"score":{"type":"number","example":3.7},"total_rating":{"type":"number","example":280},"count_of_txn":{"type":"number","example":73}}}}}}}},"Context":{"type":"object","properties":{"domain":{"type":"string","example":"seller-rating"},"action":{"type":"string","example":"/on_publish"},"version":{"type":"string","example":"0.0.1"},"provider_uri":{"type":"string","example":"https://api.provider-example.com/api/v1"},"provider_id":{"type":"string","example":"All in One - Market Place"},"publisher_uri":{"type":"string","example":"https://api.provider-example.com/api/v1"},"publisher_id":{"type":"string","example":"All in One - Market Place"},"transaction_id":{"description":"The transaction ID to be kept same across revisions","type":"string"},"message_id":{"description":"The message ID is unique to every call, and should be used to match the callback","type":"string"},"timestamp":{"type":"string","example":"2021-06-29T10:52:01.620Z"},"ttl":{"type":"string","exmple":"PT30S"},"location":{"type":"object","example":"currently empty, but can be used in future for different contexts of network"}}},"PublishMessage":{"type":"object","properties":{"rating":{"description":"List of entity ratings","type":"array","items":{"$ref":"#/components/schemas/PublishEntry"}}}},"ReviseMessage":{"type":"object","properties":{"rating":{"description":"List of entity rating to be revised","type":"array","items":{"$ref":"#/components/schemas/ReviseEntry"}},"referenceId":{"type":"string","example":"rating:cord:r35tLfL1ouJhXLGqnGM4rK9hCM5RQrpjNN47KZ8cEBQbdoKtn"}}},"PublishEntry":{"type":"object","properties":{"entity_id":{"type":"string","example":"226c67bd-9aa7-4aef-8d62-c69e3a669ce0"},"entity_name":{"type":"string","example":"Gupta Kirana Store"},"rating_type":{"type":"string","example":"Overall"},"count_of_txn":{"type":"number","example":"100"},"total_rating":{"type":"number","example":"320"}}},"ReviseEntry":{"type":"object","properties":{"entity_id":{"type":"string","example":"226c67bd-9aa7-4aef-8d62-c69e3a669ce0"},"entity_name":{"type":"string","example":"Gupta Kirana Store"},"rating_type":{"type":"string","example":"Overall"},"count_of_txn":{"type":"number","example":"80"},"total_rating":{"type":"number","example":"280"}}}}},"servers":[{"description":"Staging Network","url":"https://virtserver.swaggerhub.com/ONDC/ONDC-Protocol-Rating/0.0.1"}],"x-enum":{"publish":{"context":{"location":{"country":{"code":[{"code":"IND","description":"Represents the country","reference":""}]}},"action":[{"code":"publish","description":"Provider app indicate the publish intent","reference":""}]},"message":{"rating":{"rating_type":[{"code":"Overall","description":"Overall Experience","reference":""},{"code":"Delivery","description":"Delivery Experience","reference":""}]}}},"revise":{"context":{"location":{"country":{"code":[{"code":"IND","description":"Represents the country","reference":""}]}},"action":[{"code":"revise","description":"Provider app indicate the revise intent","reference":""}]},"message":{"rating":{"rating_type":[{"code":"Overall","description":"Overall Experience","reference":""},{"code":"Delivery","description":"Delivery Experience","reference":""}]}}},"query":{"context":{"location":{"country":{"code":[{"code":"IND","description":"Represents the country","reference":""}]}},"action":[{"code":"query","description":"Provider app indicate the query intent","reference":""}]},"message":{"rating":{"rating_type":[{"code":"Overall","description":"Overall Experience","reference":""},{"code":"Delivery","description":"Delivery Experience","reference":""}]}}},"on_query":{"context":{"location":{"country":{"code":[{"code":"IND","description":"Represents the country","reference":""}]}},"action":[{"code":"on_query","description":"Publisher app indicate the on_query intent","reference":""}]},"message":{"rating":{"rating_type":[{"code":"Overall","description":"Overall Experience","reference":""},{"code":"Delivery","description":"Delivery Experience","reference":""}]}}},"on_publish":{"context":{"location":{"country":{"code":[{"code":"IND","description":"Represents the country","reference":""}]}},"action":[{"code":"on_publish","description":"Publisher app indicate the on_publish intent","reference":""}]}},"on_revise":{"context":{"location":{"country":{"code":[{"code":"IND","description":"Represents the country","reference":""}]}},"action":[{"code":"on_revise","description":"Publisher app indicate the on_revise intent","reference":""}]}}},"x-tags":{"publish":{"message":{"rating":{"tags":[{"code":"GENERAL_INFO","description":"Describes the general information of the rating like rating, count, entity name","reference":"","list":[{"code":"RATING_COUNT","description":"Number of ratings received for an entity","reference":""}]}]}}}},"x-flows":[{"summary":"Publish - (Genesis) Credit Entry","details":[{"description":"Detailed process of publishing the entry","mermaid":"sequenceDiagram\n participant PROVIDER\n participant PUBLISHER\n participant CONFIDEX\n\n PROVIDER ->> PUBLISHER: /publish\n note over PROVIDER, PUBLISHER: Sign and send the rating entry\n PUBLISHER ->> PROVIDER: Ack\n PUBLISHER ->> PUBLISHER: Verify and transform entry\n PUBLISHER->>CONFIDEX: Anchors the entry to the chain\n CONFIDEX->>PUBLISHER: Rating Identifier\n PUBLISHER->>PROVIDER: Status (/on_publish)\n PROVIDER ->> PUBLISHER: Ack"}]},{"summary":"Revise - Credit Entry","details":[{"description":"Detailed process of Market Place revising the entry","mermaid":"sequenceDiagram\n participant PROVIDER\n participant PUBLISHER\n participant CONFIDEX\n\n PROVIDER ->> PUBLISHER: /revise\n note over PROVIDER, PUBLISHER: Sign and send the revised Entry\n PUBLISHER ->> PROVIDER: Ack\n PUBLISHER ->> PUBLISHER: Verify and transform entry\n PUBLISHER ->> CONFIDEX: Revoke the previous entry\n CONFIDEX ->> PUBLISHER: Identifier\n PUBLISHER ->> CONFIDEX: Use the Identifier and publish the revised rating to chain\n\n CONFIDEX->>PUBLISHER: Rating Identifier\n PUBLISHER->>PROVIDER: Status (/on_revise) \n PROVIDER ->> PUBLISHER: Ack"}]},{"summary":"Query","details":[{"description":"Detailed process of Market Place querying the entry","mermaid":"sequenceDiagram\n participant PROVIDER\n participant PUBLISHER\n participant CONFIDEX\n\n PROVIDER ->> PUBLISHER: /query\n note over PROVIDER, PUBLISHER: Sign and send the query\n PUBLISHER ->> PROVIDER: Ack\n PUBLISHER ->> PUBLISHER: Verify the signature\n PUBLISHER ->> CONFIDEX: Query the chain \n CONFIDEX ->> PUBLISHER: Encoded Score\n PUBLISHER->>PUBLISHER: Decode the encoded score\n\n PUBLISHER->>PROVIDER: (/on_query) Decoded Score\n PROVIDER ->> PUBLISHER: Ack"}]},{"summary":"On Publish","details":[{"description":"Detailed process of on_publish","mermaid":"sequenceDiagram\n participant PUBLISHER\n participant PROVIDER\n\n PUBLISHER ->> PROVIDER: /on_publish (status of publish)\n PROVIDER ->> PUBLISHER: Ack"}]},{"summary":"On Revise","details":[{"description":"Detailed process of on_revise","mermaid":"sequenceDiagram\n participant PUBLISHER\n participant PROVIDER\n\n PUBLISHER ->> PROVIDER: /on_revise (status of revise)\n PROVIDER ->> PUBLISHER: Ack"}]},{"summary":"On Query","details":[{"description":"Detailed process of on_query","mermaid":"sequenceDiagram\n participant PUBLISHER\n participant PROVIDER\n\n PUBLISHER ->> PROVIDER: /on_query (Decoded Score)\n PROVIDER ->> PUBLISHER: Ack"}]}],"x-examples":{"score":{"summary":"Rating API Implementation","description":"Rating Example","example_set":{"publish":{"examples":[{"summary":"publish","description":"Publish Rating of multiple entities from the provider.","value":{"context":{"domain":"ONDC:NTS12","action":"publish","version":"1.0.0","provider_id":"All in One - Market Place","provider_uri":"https://api.example.com/api/rating/v1","publisher_id":"Rating Publisher on Ledger","publisher_uri":"https://api.publisher-example.com/api/rating/v1","transaction_id":"226c67bd-9aa7-4aef-8d62-c69e3a669ce0","message_id":"226c67bd-9aa7-4aef-8d62-c69e3a669c10","timestamp":"2021-06-29T10:52:01.620Z","ttl":"PT30S","location":{"country":{"code":"IND"}}},"message":{"rating":[{"entity_id":"a250a6db99213211f333db7f328085ae277c680d2c7178c4bc65cab9cdab78aa","entity_name":"Gupta Kirana Store","rating_type":"Overall","count_of_txn":100,"total_rating":320}]}}}]},"on_publish":{"examples":[{"summary":"on_publish","description":"Update the status of rating publish on ledger.","value":{"context":{"domain":"ONDC:NTS12","action":"on_publish","version":"1.0.0","provider_id":"All in One - Market Place","provider_uri":"https://api.example.com/api/rating/v1","publisher_id":"Rating Publisher on Ledger","publisher_uri":"https://api.publisher-example.com/api/rating/v1","transaction_id":"226c67bd-9aa7-4aef-8d62-c69e3a669ce0","message_id":"226c67bd-9aa7-4aef-8d62-c69e3a669c10","timestamp":"2021-06-29T10:52:01.620Z","ttl":"PT30S","location":{"country":{"code":"IND"}}},"message":{"status":true}}}]},"revise":{"examples":[{"summary":"revise","description":"Revise the previously published rating.","value":{"context":{"domain":"ONDC:NTS12","action":"revise","version":"1.0.0","provider_id":"All in One - Market Place","provider_uri":"https://api.example.com/api/rating/v1","publisher_id":"Rating Publisher on Ledger","publisher_uri":"https://api.publisher-example.com/api/rating/v1","transaction_id":"226c67bd-9aa7-4aef-8d62-c69e3a669ce0","message_id":"226c67bd-9aa7-4aef-8d62-c69e3a669c11","timestamp":"2021-06-29T10:52:01.620Z","ttl":"PT30S","location":{"country":{"code":"IND"}}},"message":{"rating":[{"entity_id":"a250a6db99213211f333db7f328085ae277c680d2c7178c4bc65cab9cdab78aa","rating_type":"Overall","count_of_txn":80,"total_rating":280}]}}}]},"on_revise":{"examples":[{"summary":"on_revise","description":"Callback of Revise call to get to know the status of the revise call.","value":{"context":{"domain":"ONDC:NTS12","action":"on_revise","version":"1.0.0","provider_id":"All in One - Market Place","provider_uri":"https://api.example.com/api/rating/v1","publisher_id":"Rating Publisher on Ledger","publisher_uri":"https://api.publisher-example.com/api/rating/v1","transaction_id":"226c67bd-9aa7-4aef-8d62-c69e3a669ce0","message_id":"226c67bd-9aa7-4aef-8d62-c69e3a669c11","timestamp":"2021-06-29T10:52:01.620Z","ttl":"PT30S","location":{"country":{"code":"IND"}}},"message":{"status":true}}}]},"on_query":{"examples":[{"summary":"on_query","description":"Callback of the query, which provides the latest aggregated score of the entity.","value":{"context":{"domain":"ONDC:NTS12","action":"on_query","version":"1.0.0","provider_id":"All in One - Market Place","provider_uri":"https://api.example.com/api/rating/v1","publisher_id":"Rating Publisher on Ledger","publisher_uri":"https://api.publisher-example.com/api/rating/v1","transaction_id":"226c67bd-9aa7-4aef-8d62-c69e3a669ce1","message_id":"226c67bd-9aa7-4aef-8d62-c69e3a669d10","timestamp":"2021-06-29T10:52:01.620Z","ttl":"PT30S","location":{"country":{"code":"IND"}}},"message":{"scores":[{"entity_id":"a250a6db99213211f333db7f328085ae277c680d2c7178c4bc65cab9cdab78aa","entity_name":"Gupta Kirana Store","score":3.7,"total_rating":280,"count_of_txn":73}]}}}]},"query":{"examples":[{"summary":"query","description":"Initiate the query to get the latest aggregated score of set of entitites.","value":{"context":{"domain":"ONDC:NTS12","action":"publish","version":"1.0.0","provider_id":"All in One - Market Place","provider_uri":"https://api.example.com/api/rating/v1","publisher_id":"Rating Publisher on Ledger","publisher_uri":"https://api.publisher-example.com/api/rating/v1","transaction_id":"226c67bd-9aa7-4aef-8d62-c69e3a669ce1","message_id":"226c67bd-9aa7-4aef-8d62-c69e3a669d10","timestamp":"2021-06-29T10:52:01.620Z","ttl":"PT30S","location":{"country":{"code":"IND"}}},"message":{"entity_list":[{"entity_id":"a250a6db99213211f333db7f328085ae277c680d2c7178c4bc65cab9cdab78aa","rating_type":"Overall"}]}}}]}}}},"x-attributes":{"rating":{"attribute_set":{"publish":{"message":{"rating":{" entity_id\n":{"required":true,"type":"String","owner":"Publisher","usage":"a250a6db99213211f333db7f328085ae277c680d2c7178c4bc65cab9cdab78aa","description":"Provides Persistent ID of the seller / entity, where this is generated based on the below formula. Hash(PREFIX:), Example: Hash(“GSTIN:22AAAAA0000A1Z5”), Hash(“PAN:XYZRN1234A”), Hash(“UIDAI:123412341234”) (in this order of availability of documents."}," entity_name\n":{"required":false,"type":"String","owner":"Publisher","usage":"Gupta krishna Stores","description":"Name of the seller (note, uniqueness is determined by `entity_id` field)"}," rating_type\n":{"required":true,"type":"ENUM","owner":"Publisher","usage":"Overall","description":"What is rated in this event: overall experience or just the delivery"}," count_of_txn\n":{"required":true,"type":"Integer","owner":"Publisher","usage":100,"description":"total number of rating transactions"}," total_rating\n":{"required":true,"type":"Number","owner":"Publisher","usage":200,"description":"total rating value (each rating transaction is done on the scale of 0-5)"}}},"context":{"location":{"country":{"code":{"required":"mandatory","type":"string","owner":"Publisher","usage":"IND","description":"Describes country code as per ISO 3166-1 and ISO 3166-2 format"}}},"timestamp":{"required":"mandatory","type":"string","owner":"Publisher","usage":"2023-03-23T04:41:16Z","description":"Describes tme of request generation in RFC3339 format"},"publisher_id":{"required":"mandatory","type":"string","owner":"Publisher","usage":"api.example-publisher.com","description":"Describes subscriber ID of the Publisher"},"transaction_id":{"required":"mandatory","type":"string","owner":"Publisher","usage":"6743e9e2","description":"Describes a unique value which persists across all API calls"},"message_id":{"required":"mandatory","type":"string","owner":"Publisher","usage":"13ba8018f176","description":"Describes a unique value which persists during a request / callback cycle."},"version":{"required":"mandatory","type":"integer","owner":"Publisher","usage":"1.0.0","description":"Describes the version of transaction protocol being used by the sender."},"action":{"required":"mandatory","type":"string","owner":"Publisher","usage":"publish","description":"Describes the method being called by the sender and executed at the receiver."},"publisher_uri":{"required":"mandatory","type":"string","owner":"Publisher","usage":"https://api.example-publisher.com/pilot/rating/v1","description":"Describes subscriber URL of the Publisher for accepting requests from Providers."},"ttl":{"required":"mandatory","type":"string","owner":"Publisher","usage":"PT30S","description":"Describes the duration in ISO8601 format after timestamp for which this message holds valid"},"provider_uri":{"required":"mandatory","type":"string","owner":"Publisher","usage":"https://api.example-provider.com/pilot/rating/v1","description":"Describes subscriber URL of the Provider for accepting callbacks from Publishers."},"provider_id":{"required":"mandatory","type":"string","owner":"Publisher","usage":"api.example-provider.com","description":"Describes subscriber ID of the Provider"}}},"on_publish":{"message":{"status":{"required":true,"type":"Boolean","owner":"Publisher","usage":true,"description":"Describes the status of the publish"}},"context":{"location":{"country":{"code":{"required":"mandatory","type":"string","owner":"Provider","usage":"IND","description":"Describes country code as per ISO 3166-1 and ISO 3166-2 format"}}},"timestamp":{"required":"mandatory","type":"string","owner":"Publisher","usage":"2023-03-23T04:41:16Z","description":"Describes tme of request generation in RFC3339 format"},"publisher_id":{"required":"mandatory","type":"string","owner":"Provider","usage":"api.example-publisher.com","description":"Describes subscriber ID of the Publisher"},"transaction_id":{"required":"mandatory","type":"string","owner":"Provider","usage":"6743e9e2","description":"Describes a unique value which persists across all API calls"},"message_id":{"required":"mandatory","type":"string","owner":"Provider","usage":"13ba8018f176","description":"Describes a unique value which persists during a request / callback cycle."},"version":{"required":"mandatory","type":"integer","owner":"Provider","usage":"1.0.0","description":"Describes the version of transaction protocol being used by the sender."},"action":{"required":"mandatory","type":"string","owner":"Publisher","usage":"on_publish","description":"Describes the method being called by the sender and executed at the receiver."},"publisher_uri":{"required":"mandatory","type":"string","owner":"Provider","usage":"https://api.example-publisher.com/pilot/rating/v1","description":"Describes subscriber URL of the Publisher for accepting requests from Providers."},"ttl":{"required":"mandatory","type":"string","owner":"Provider","usage":"PT30S","description":"Describes the duration in ISO8601 format after timestamp for which this message holds valid"},"provider_uri":{"required":"mandatory","type":"string","owner":"Provider","usage":"https://api.example-provider.com/pilot/rating/v1","description":"Describes subscriber URL of the Provider for accepting callbacks from Publishers."},"provider_id":{"required":"mandatory","type":"string","owner":"Provider","usage":"api.example-provider.com","description":"Describes subscriber ID of the Provider"}}},"revise":{"message":{"rating":{" entity_id\n":{"required":true,"type":"String","owner":"Publisher","usage":"a250a6db99213211f333db7f328085ae277c680d2c7178c4bc65cab9cdab78aa","description":"Provides Persistent ID of the seller / entity, where this is generated based on the below formula. Hash(PREFIX:), Example: Hash(“GSTIN:22AAAAA0000A1Z5”), Hash(“PAN:XYZRN1234A”), Hash(“UIDAI:123412341234”) (in this order of availability of documents."}," rating_type\n":{"required":true,"type":"ENUM","owner":"Publisher","usage":"Overall","description":"What is revised in this event: overall experience or just the delivery"}," count_of_txn\n":{"required":true,"type":"Integer","owner":"Publisher","usage":100,"description":"total number of rating transactions"}," total_rating\n":{"required":true,"type":"Number","owner":"Publisher","usage":200,"description":"total rating value (each rating transaction is done on the scale of 0-5)"}}},"context":{"location":{"country":{"code":{"required":"mandatory","type":"string","owner":"Publisher","usage":"IND","description":"Describes country code as per ISO 3166-1 and ISO 3166-2 format"}}},"timestamp":{"required":"mandatory","type":"string","owner":"Publisher","usage":"2023-03-23T04:41:16Z","description":"Describes tme of request generation in RFC3339 format"},"publisher_id":{"required":"mandatory","type":"string","owner":"Publisher","usage":"api.example-publisher.com","description":"Describes subscriber ID of the Publisher"},"transaction_id":{"required":"mandatory","type":"string","owner":"Publisher","usage":"6743e9e2","description":"Describes a unique value which persists across all API calls"},"message_id":{"required":"mandatory","type":"string","owner":"Publisher","usage":"13ba8018f176","description":"Describes a unique value which persists during a request / callback cycle."},"version":{"required":"mandatory","type":"integer","owner":"Publisher","usage":"1.0.0","description":"Describes the version of transaction protocol being used by the sender."},"action":{"required":"mandatory","type":"string","owner":"Publisher","usage":"revise","description":"Describes the method being called by the sender and executed at the receiver."},"publisher_uri":{"required":"mandatory","type":"string","owner":"Publisher","usage":"https://api.example-publisher.com/pilot/rating/v1","description":"Describes subscriber URL of the Publisher for accepting requests from Providers."},"ttl":{"required":"mandatory","type":"string","owner":"Publisher","usage":"PT30S","description":"Describes the duration in ISO8601 format after timestamp for which this message holds valid"},"provider_uri":{"required":"mandatory","type":"string","owner":"Publisher","usage":"https://api.example-provider.com/pilot/rating/v1","description":"Describes subscriber URL of the Provider for accepting callbacks from Publishers."},"provider_id":{"required":"mandatory","type":"string","owner":"Publisher","usage":"api.example-provider.com","description":"Describes subscriber ID of the Provider"}}},"on_revise":{"message":{"status":{"required":true,"type":"Boolean","owner":"Publisher","usage":true,"description":"Describes the status of the publish"}},"context":{"location":{"country":{"code":{"required":"mandatory","type":"string","owner":"Provider","usage":"IND","description":"Describes country code as per ISO 3166-1 and ISO 3166-2 format"}}},"timestamp":{"required":"mandatory","type":"string","owner":"Publisher","usage":"2023-03-23T04:41:16Z","description":"Describes tme of request generation in RFC3339 format"},"publisher_id":{"required":"mandatory","type":"string","owner":"Provider","usage":"api.example-publisher.com","description":"Describes subscriber ID of the Publisher"},"transaction_id":{"required":"mandatory","type":"string","owner":"Provider","usage":"6743e9e2","description":"Describes a unique value which persists across all API calls"},"message_id":{"required":"mandatory","type":"string","owner":"Provider","usage":"13ba8018f176","description":"Describes a unique value which persists during a request / callback cycle."},"version":{"required":"mandatory","type":"integer","owner":"Provider","usage":"1.0.0","description":"Describes the version of transaction protocol being used by the sender."},"action":{"required":"mandatory","type":"string","owner":"Publisher","usage":"on_revise","description":"Describes the method being called by the sender and executed at the receiver."},"publisher_uri":{"required":"mandatory","type":"string","owner":"Provider","usage":"https://api.example-publisher.com/pilot/rating/v1","description":"Describes subscriber URL of the Publisher for accepting requests from Providers."},"ttl":{"required":"mandatory","type":"string","owner":"Provider","usage":"PT30S","description":"Describes the duration in ISO8601 format after timestamp for which this message holds valid"},"provider_uri":{"required":"mandatory","type":"string","owner":"Provider","usage":"https://api.example-provider.com/pilot/rating/v1","description":"Describes subscriber URL of the Provider for accepting callbacks from Publishers."},"provider_id":{"required":"mandatory","type":"string","owner":"Provider","usage":"api.example-provider.com","description":"Describes subscriber ID of the Provider"}}},"query":{"message":{" entity_list":{"entity_id\n":{"required":true,"type":"String","owner":"Publisher","usage":"a250a6db99213211f333db7f328085ae277c680d2c7178c4bc65cab9cdab78aa","description":"Provides Persistent ID of the seller / entity, where this is generated based on the below formula. Hash(PREFIX:), Example: Hash(“GSTIN:22AAAAA0000A1Z5”), Hash(“PAN:XYZRN1234A”), Hash(“UIDAI:123412341234”) (in this order of availability of documents."}," rating_type\n\n":{"required":true,"type":"Enum","owner":"Publisher","usage":"Overall","description":"Describes the type of rating like overall or just the delivery"}}},"context":{"location":{"country":{"code":{"required":"mandatory","type":"string","owner":"Publisher","usage":"IND","description":"Describes country code as per ISO 3166-1 and ISO 3166-2 format"}}},"timestamp":{"required":"mandatory","type":"string","owner":"Publisher","usage":"2023-03-23T04:41:16Z","description":"Describes tme of request generation in RFC3339 format"},"publisher_id":{"required":"mandatory","type":"string","owner":"Publisher","usage":"api.example-publisher.com","description":"Describes subscriber ID of the Publisher"},"transaction_id":{"required":"mandatory","type":"string","owner":"Publisher","usage":"6743e9e2","description":"Describes a unique value which persists across all API calls"},"message_id":{"required":"mandatory","type":"string","owner":"Publisher","usage":"13ba8018f176","description":"Describes a unique value which persists during a request / callback cycle."},"version":{"required":"mandatory","type":"integer","owner":"Publisher","usage":"1.0.0","description":"Describes the version of transaction protocol being used by the sender."},"action":{"required":"mandatory","type":"string","owner":"Publisher","usage":"query","description":"Describes the method being called by the sender and executed at the receiver."},"publisher_uri":{"required":"mandatory","type":"string","owner":"Publisher","usage":"https://api.example-publisher.com/pilot/rating/v1","description":"Describes subscriber URL of the Publisher for accepting requests from Providers."},"ttl":{"required":"mandatory","type":"string","owner":"Publisher","usage":"PT30S","description":"Describes the duration in ISO8601 format after timestamp for which this message holds valid"},"provider_uri":{"required":"mandatory","type":"string","owner":"Publisher","usage":"https://api.example-provider.com/pilot/rating/v1","description":"Describes subscriber URL of the Provider for accepting callbacks from Publishers."},"provider_id":{"required":"mandatory","type":"string","owner":"Publisher","usage":"api.example-provider.com","description":"Describes subscriber ID of the Provider"}}},"on_query":{"message":{" scores":{" entity_id\n\n":{"required":true,"type":"String","owner":"Publisher","usage":"a250a6db99213211f333db7f328085ae277c680d2c7178c4bc65cab9cdab78aa","description":"Describes the ID of the seller "}," entity_name\n":{"required":true,"type":"String","owner":"Publisher","usage":"Gupta Krishna Store","description":"Describes the name of the seller"}," score\n":{"required":true,"type":"Number","owner":"Publisher","usage":1.5,"description":"Describes the aggregate score"}," total_rating\n":{"required":true,"type":"Number","owner":"Publisher","usage":200,"description":"Describes the total rating"}},"rating":{" count_of_txn\n":{"required":true,"type":"Integer","owner":"Publisher","usage":150,"description":"Describes the total number of transactions"}}},"context":{"location":{"country":{"code":{"required":"mandatory","type":"string","owner":"Provider","usage":"IND","description":"Describes country code as per ISO 3166-1 and ISO 3166-2 format"}}},"timestamp":{"required":"mandatory","type":"string","owner":"Publisher","usage":"2023-03-23T04:41:16Z","description":"Describes tme of request generation in RFC3339 format"},"publisher_id":{"required":"mandatory","type":"string","owner":"Provider","usage":"api.example-publisher.com","description":"Describes subscriber ID of the Publisher"},"transaction_id":{"required":"mandatory","type":"string","owner":"Provider","usage":"6743e9e2","description":"Describes a unique value which persists across all API calls"},"message_id":{"required":"mandatory","type":"string","owner":"Provider","usage":"13ba8018f176","description":"Describes a unique value which persists during a request / callback cycle."},"version":{"required":"mandatory","type":"integer","owner":"Provider","usage":"1.0.0","description":"Describes the version of transaction protocol being used by the sender."},"action":{"required":"mandatory","type":"string","owner":"Publisher","usage":"on_query","description":"Describes the method being called by the sender and executed at the receiver."},"publisher_uri":{"required":"mandatory","type":"string","owner":"Provider","usage":"https://api.example-publisher.com/pilot/rating/v1","description":"Describes subscriber URL of the Publisher for accepting requests from Providers."},"ttl":{"required":"mandatory","type":"string","owner":"Provider","usage":"PT30S","description":"Describes the duration in ISO8601 format after timestamp for which this message holds valid"},"provider_uri":{"required":"mandatory","type":"string","owner":"Provider","usage":"https://api.example-provider.com/pilot/rating/v1","description":"Describes subscriber URL of the Provider for accepting callbacks from Publishers."},"provider_id":{"required":"mandatory","type":"string","owner":"Provider","usage":"api.example-provider.com","description":"Describes subscriber ID of the Provider"}}}}}}} \ No newline at end of file +let build_spec = {"openapi":"3.0.0","info":{"title":"Issue and Grievance Management (IGM) for ONDC","description":"ONDC Issue and Grievance Management (IGM) API Specification","version":"1.0.0"},"security":[{"SubscriberAuth":[]}],"paths":{"/publish":{"post":{"tags":["Provider API"],"description":"Publish the ratings to the chain, for the entity with given transaction / message ID ","operationId":"publishRatings","requestBody":{"description":"Write the ratings to the chain. Notice that this can take 1 or more entries from the NP (Network Participant) and submit it to the API (which inturn will write to the chain).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishRating"}}},"required":"true"},"responses":{"default":{"$ref":"#/components/schemas/DefaultResponse"}}}},"/on_publish":{"post":{"tags":["Publisher API"],"description":"Inform the client about success or failure of the publish rating","operationId":"onPublishRating","requestBody":{"description":"Callback of publish rating operation to the chain. Considering the /publish call will have multiple entries, this can collate all the entries and send the response, upon completion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnPublishRating"}}},"required":"true"},"responses":{"default":{"$ref":"#/components/schemas/DefaultResponse"}}}},"/revise":{"post":{"tags":["Provider API"],"description":"Revise ratings in the chain. This can happen due to 2 reasons. 1 is when the user themself changes the given rating over the period (possible for seller to settle bad rating with the buyer), or some discrepancies are found during the auditing.","operationId":"reviseRatings","requestBody":{"description":"revise the ratings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviseRating"}}},"required":"true"},"responses":{"default":{"$ref":"#/components/schemas/DefaultResponse"}}}},"/on_revise":{"post":{"tags":["Publisher API"],"description":"update the status of the revise operation on the chain.","operationId":"onReviseRating","requestBody":{"description":"update the ratings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnReviseRating"}}},"required":"true"},"responses":{"default":{"$ref":"#/components/schemas/DefaultResponse"}}}},"/query":{"post":{"tags":["Provider API"],"description":"Read aggregate score, read all given entities ratings, more details based on parameters","operationId":"Query","requestBody":{"description":"query the score","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRating"}}},"required":"true"},"responses":{"default":{"$ref":"#/components/schemas/DefaultResponse"}}}},"/on_query":{"post":{"tags":["Publisher API"],"description":"Response / Callback to the query call","operationId":"onQuery","requestBody":{"description":"query the ratings / score","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnQueryRating"}}},"required":"true"},"responses":{"200":{"description":"Aggregated Score details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/200_Res"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"SubscriberAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Signature of message body using Collector or Receiver subscriber's signing public key.

Format:

Authorization : Signature keyId=\"{subscriber_id}|{unique_key_id}|{algorithm}\",algorithm=\"ed25519\",created=\"1606970629\",expires=\"1607030629\",headers=\"(created) (expires) digest\",signature=\"Base64(signing string)\""}},"schemas":{"Error":{"description":"Describes an error object","type":"object","properties":{"type":{"type":"string","enum":["CONTEXT-ERROR","CORE-ERROR","DOMAIN-ERROR","POLICY-ERROR","JSON-SCHEMA-ERROR"]}}},"DefaultResponse":{"description":"Acknowledgement of message received after successful validation of schema and signature","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"ack":{"allOf":[{"$ref":"#/components/schemas/Ack"},{"type":"object"},{"properties":{"status":{"enum":["ACK","NACK"]}}}]}},"required":["ack"]},"error":{"$ref":"#/components/schemas/Error"}},"required":["message"]}}}},"200_Res":{"type":"object","properties":{"ack":{"$ref":"#/components/schemas/Ack"}}},"Ack":{"description":"Describes the acknowledgement sent in response to an API call. If the implementation uses HTTP/S, then Ack must be returned in the same session. Every API call to a BPP must be responded to with an Ack whether the BPP intends to respond with a callback or not. This has one property called `status` that indicates the status of the Acknowledgement.","type":"object","additionalProperties":false,"properties":{"status":{"type":"string","description":"The status of the acknowledgement. If the request passes the validation criteria of the BPP, then this is set to ACK. If a BPP responds with status = `ACK` to a request, it is required to respond with a callback. If the request fails the validation criteria, then this is set to NACK. Additionally, if a BPP does not intend to respond with a callback even after the request meets the validation criteria, it should set this value to `NACK`.","enum":["ACK","NACK"]}}},"Descriptor":{"description":"Physical description of something.","type":"object","additionalProperties":false,"properties":{"name":{"type":"string"},"code":{"type":"string"},"short_desc":{"type":"string"},"long_desc":{"type":"string"},"additional_desc":{"type":"object","additionalProperties":false,"properties":{"url":{"type":"string"},"content_type":{"type":"string","enum":["text/plain","text/html","application/json"]}}}}},"OnPublishResult_20x":{"type":"object","properties":{"status":{"type":"array","example":"true"}}},"PublishRating":{"type":"object","properties":{"context":{"$ref":"#/components/schemas/Context"},"message":{"$ref":"#/components/schemas/PublishMessage"}}},"OnPublishRating":{"type":"object","properties":{"context":{"$ref":"#/components/schemas/Context"},"message":{"$ref":"#/components/schemas/OnPublishResult_20x"}}},"OnReviseResult_20x":{"type":"object","properties":{"status":{"type":"array","example":"true"}}},"ReviseRating":{"type":"object","properties":{"context":{"$ref":"#/components/schemas/Context"},"message":{"$ref":"#/components/schemas/ReviseMessage"}}},"OnReviseRating":{"type":"object","properties":{"context":{"$ref":"#/components/schemas/Context"},"message":{"$ref":"#/components/schemas/OnReviseResult_20x"}}},"QueryRating":{"type":"object","properties":{"context":{"$ref":"#/components/schemas/Context"},"message":{"$ref":"#/components/schemas/QueryMessage"}}},"QueryMessage":{"type":"object","properties":{"entity_list":{"type":"array","items":{"type":"object","properties":{"entityId":{"type":"string","example":"286cf1b1-3e16-448f-b675-3b232e82174d"},"rating_type":{"type":"string","example":"Overall"}}}}}},"OnQueryRating":{"type":"object","properties":{"context":{"$ref":"#/components/schemas/Context"},"message":{"type":"object","properties":{"scores":{"type":"array","items":{"type":"object","properties":{"entityId":{"type":"string","example":"286cf1b1-3e16-448f-b675-3b232e82174d"},"entity_name":{"type":"string"},"score":{"type":"number","example":3.7},"total_rating":{"type":"number","example":280},"count_of_txn":{"type":"number","example":73}}}}}}}},"Context":{"type":"object","properties":{"domain":{"type":"string","example":"seller-rating"},"action":{"type":"string","example":"/on_publish"},"version":{"type":"string","example":"0.0.1"},"provider_uri":{"type":"string","example":"https://api.provider-example.com/api/v1"},"provider_id":{"type":"string","example":"All in One - Market Place"},"publisher_uri":{"type":"string","example":"https://api.provider-example.com/api/v1"},"publisher_id":{"type":"string","example":"All in One - Market Place"},"transaction_id":{"description":"The transaction ID to be kept same across revisions","type":"string"},"message_id":{"description":"The message ID is unique to every call, and should be used to match the callback","type":"string"},"timestamp":{"type":"string","example":"2021-06-29T10:52:01.620Z"},"ttl":{"type":"string","exmple":"PT30S"},"location":{"type":"object","example":"currently empty, but can be used in future for different contexts of network"}}},"PublishMessage":{"type":"object","properties":{"rating":{"description":"List of entity ratings","type":"array","items":{"$ref":"#/components/schemas/PublishEntry"}}}},"ReviseMessage":{"type":"object","properties":{"rating":{"description":"List of entity rating to be revised","type":"array","items":{"$ref":"#/components/schemas/ReviseEntry"}},"referenceId":{"type":"string","example":"rating:cord:r35tLfL1ouJhXLGqnGM4rK9hCM5RQrpjNN47KZ8cEBQbdoKtn"}}},"PublishEntry":{"type":"object","properties":{"entity_id":{"type":"string","example":"226c67bd-9aa7-4aef-8d62-c69e3a669ce0"},"entity_name":{"type":"string","example":"Gupta Kirana Store"},"rating_type":{"type":"string","example":"Overall"},"count_of_txn":{"type":"number","example":"100"},"total_rating":{"type":"number","example":"320"}}},"ReviseEntry":{"type":"object","properties":{"entity_id":{"type":"string","example":"226c67bd-9aa7-4aef-8d62-c69e3a669ce0"},"entity_name":{"type":"string","example":"Gupta Kirana Store"},"rating_type":{"type":"string","example":"Overall"},"count_of_txn":{"type":"number","example":"80"},"total_rating":{"type":"number","example":"280"}}}}},"servers":[{"description":"Staging Network","url":"https://virtserver.swaggerhub.com/ONDC/ONDC-Protocol-Rating/0.0.1"}],"x-enum":{"publish":{"context":{"location":{"country":{"code":[{"code":"IND","description":"Represents the country","reference":""}]}},"action":[{"code":"publish","description":"Provider app indicate the publish intent","reference":""}]},"message":{"rating":{"rating_type":[{"code":"Overall","description":"Overall Experience","reference":""},{"code":"Delivery","description":"Delivery Experience","reference":""}]}}},"revise":{"context":{"location":{"country":{"code":[{"code":"IND","description":"Represents the country","reference":""}]}},"action":[{"code":"revise","description":"Provider app indicate the revise intent","reference":""}]},"message":{"rating":{"rating_type":[{"code":"Overall","description":"Overall Experience","reference":""},{"code":"Delivery","description":"Delivery Experience","reference":""}]}}},"query":{"context":{"location":{"country":{"code":[{"code":"IND","description":"Represents the country","reference":""}]}},"action":[{"code":"query","description":"Provider app indicate the query intent","reference":""}]},"message":{"rating":{"rating_type":[{"code":"Overall","description":"Overall Experience","reference":""},{"code":"Delivery","description":"Delivery Experience","reference":""}]}}},"on_query":{"context":{"location":{"country":{"code":[{"code":"IND","description":"Represents the country","reference":""}]}},"action":[{"code":"on_query","description":"Publisher app indicate the on_query intent","reference":""}]},"message":{"rating":{"rating_type":[{"code":"Overall","description":"Overall Experience","reference":""},{"code":"Delivery","description":"Delivery Experience","reference":""}]}}},"on_publish":{"context":{"location":{"country":{"code":[{"code":"IND","description":"Represents the country","reference":""}]}},"action":[{"code":"on_publish","description":"Publisher app indicate the on_publish intent","reference":""}]}},"on_revise":{"context":{"location":{"country":{"code":[{"code":"IND","description":"Represents the country","reference":""}]}},"action":[{"code":"on_revise","description":"Publisher app indicate the on_revise intent","reference":""}]}}},"x-tags":{"publish":{"message":{"rating":{"tags":[{"code":"GENERAL_INFO","description":"Describes the general information of the rating like rating, count, entity name","reference":"","list":[{"code":"RATING_COUNT","description":"Number of ratings received for an entity","reference":""}]}]}}}},"x-flows":[{"summary":"Publish - (Genesis) Credit Entry","details":[{"description":"Detailed process of publishing the entry","mermaid":"sequenceDiagram\n participant PROVIDER\n participant PUBLISHER\n participant CONFIDEX\n\n PROVIDER ->> PUBLISHER: /publish\n note over PROVIDER, PUBLISHER: Sign and send the rating entry\n PUBLISHER ->> PROVIDER: Ack\n PUBLISHER ->> PUBLISHER: Verify and transform entry\n PUBLISHER->>CONFIDEX: Anchors the entry to the chain\n CONFIDEX->>PUBLISHER: Rating Identifier\n PUBLISHER->>PROVIDER: Status (/on_publish)\n PROVIDER ->> PUBLISHER: Ack"}]},{"summary":"Revise - Credit Entry","details":[{"description":"Detailed process of Market Place revising the entry","mermaid":"sequenceDiagram\n participant PROVIDER\n participant PUBLISHER\n participant CONFIDEX\n\n PROVIDER ->> PUBLISHER: /revise\n note over PROVIDER, PUBLISHER: Sign and send the revised Entry\n PUBLISHER ->> PROVIDER: Ack\n PUBLISHER ->> PUBLISHER: Verify and transform entry\n PUBLISHER ->> CONFIDEX: Revoke the previous entry\n CONFIDEX ->> PUBLISHER: Identifier\n PUBLISHER ->> CONFIDEX: Use the Identifier and publish the revised rating to chain\n\n CONFIDEX->>PUBLISHER: Rating Identifier\n PUBLISHER->>PROVIDER: Status (/on_revise) \n PROVIDER ->> PUBLISHER: Ack"}]},{"summary":"Query","details":[{"description":"Detailed process of Market Place querying the entry","mermaid":"sequenceDiagram\n participant PROVIDER\n participant PUBLISHER\n participant CONFIDEX\n\n PROVIDER ->> PUBLISHER: /query\n note over PROVIDER, PUBLISHER: Sign and send the query\n PUBLISHER ->> PROVIDER: Ack\n PUBLISHER ->> PUBLISHER: Verify the signature\n PUBLISHER ->> CONFIDEX: Query the chain \n CONFIDEX ->> PUBLISHER: Encoded Score\n PUBLISHER->>PUBLISHER: Decode the encoded score\n\n PUBLISHER->>PROVIDER: (/on_query) Decoded Score\n PROVIDER ->> PUBLISHER: Ack"}]},{"summary":"On Publish","details":[{"description":"Detailed process of on_publish","mermaid":"sequenceDiagram\n participant PUBLISHER\n participant PROVIDER\n\n PUBLISHER ->> PROVIDER: /on_publish (status of publish)\n PROVIDER ->> PUBLISHER: Ack"}]},{"summary":"On Revise","details":[{"description":"Detailed process of on_revise","mermaid":"sequenceDiagram\n participant PUBLISHER\n participant PROVIDER\n\n PUBLISHER ->> PROVIDER: /on_revise (status of revise)\n PROVIDER ->> PUBLISHER: Ack"}]},{"summary":"On Query","details":[{"description":"Detailed process of on_query","mermaid":"sequenceDiagram\n participant PUBLISHER\n participant PROVIDER\n\n PUBLISHER ->> PROVIDER: /on_query (Decoded Score)\n PROVIDER ->> PUBLISHER: Ack"}]}],"x-examples":{"score":{"summary":"Rating API Implementation","description":"Rating Example","example_set":{"publish":{"examples":[{"summary":"publish","description":"Publish Rating of multiple entities from the provider.","value":{"context":{"domain":"ONDC:NTS12","action":"publish","version":"1.0.0","provider_id":"All in One - Market Place","provider_uri":"https://api.example.com/api/rating/v1","publisher_id":"Rating Publisher on Ledger","publisher_uri":"https://api.publisher-example.com/api/rating/v1","transaction_id":"226c67bd-9aa7-4aef-8d62-c69e3a669ce0","message_id":"226c67bd-9aa7-4aef-8d62-c69e3a669c10","timestamp":"2021-06-29T10:52:01.620Z","ttl":"PT30S","location":{"country":{"code":"IND"}}},"message":{"rating":[{"entity_id":"a250a6db99213211f333db7f328085ae277c680d2c7178c4bc65cab9cdab78aa","entity_name":"Gupta Kirana Store","rating_type":"Overall","count_of_txn":100,"total_rating":320}]}}}]},"on_publish":{"examples":[{"summary":"on_publish","description":"Update the status of rating publish on ledger.","value":{"context":{"domain":"ONDC:NTS12","action":"on_publish","version":"1.0.0","provider_id":"All in One - Market Place","provider_uri":"https://api.example.com/api/rating/v1","publisher_id":"Rating Publisher on Ledger","publisher_uri":"https://api.publisher-example.com/api/rating/v1","transaction_id":"226c67bd-9aa7-4aef-8d62-c69e3a669ce0","message_id":"226c67bd-9aa7-4aef-8d62-c69e3a669c10","timestamp":"2021-06-29T10:52:01.620Z","ttl":"PT30S","location":{"country":{"code":"IND"}}},"message":{"status":[true]}}}]},"revise":{"examples":[{"summary":"revise","description":"Revise the previously published rating.","value":{"context":{"domain":"ONDC:NTS12","action":"revise","version":"1.0.0","provider_id":"All in One - Market Place","provider_uri":"https://api.example.com/api/rating/v1","publisher_id":"Rating Publisher on Ledger","publisher_uri":"https://api.publisher-example.com/api/rating/v1","transaction_id":"226c67bd-9aa7-4aef-8d62-c69e3a669ce0","message_id":"226c67bd-9aa7-4aef-8d62-c69e3a669c11","timestamp":"2021-06-29T10:52:01.620Z","ttl":"PT30S","location":{"country":{"code":"IND"}}},"message":{"rating":[{"entity_id":"a250a6db99213211f333db7f328085ae277c680d2c7178c4bc65cab9cdab78aa","rating_type":"Overall","count_of_txn":80,"total_rating":280}]}}}]},"on_revise":{"examples":[{"summary":"on_revise","description":"Callback of Revise call to get to know the status of the revise call.","value":{"context":{"domain":"ONDC:NTS12","action":"on_revise","version":"1.0.0","provider_id":"All in One - Market Place","provider_uri":"https://api.example.com/api/rating/v1","publisher_id":"Rating Publisher on Ledger","publisher_uri":"https://api.publisher-example.com/api/rating/v1","transaction_id":"226c67bd-9aa7-4aef-8d62-c69e3a669ce0","message_id":"226c67bd-9aa7-4aef-8d62-c69e3a669c11","timestamp":"2021-06-29T10:52:01.620Z","ttl":"PT30S","location":{"country":{"code":"IND"}}},"message":{"status":[true]}}}]},"on_query":{"examples":[{"summary":"on_query","description":"Callback of the query, which provides the latest aggregated score of the entity.","value":{"context":{"domain":"ONDC:NTS12","action":"on_query","version":"1.0.0","provider_id":"All in One - Market Place","provider_uri":"https://api.example.com/api/rating/v1","publisher_id":"Rating Publisher on Ledger","publisher_uri":"https://api.publisher-example.com/api/rating/v1","transaction_id":"226c67bd-9aa7-4aef-8d62-c69e3a669ce1","message_id":"226c67bd-9aa7-4aef-8d62-c69e3a669d10","timestamp":"2021-06-29T10:52:01.620Z","ttl":"PT30S","location":{"country":{"code":"IND"}}},"message":{"scores":[{"entity_id":"a250a6db99213211f333db7f328085ae277c680d2c7178c4bc65cab9cdab78aa","entity_name":"Gupta Kirana Store","score":3.7,"total_rating":280,"count_of_txn":73}]}}}]},"query":{"examples":[{"summary":"query","description":"Initiate the query to get the latest aggregated score of set of entitites.","value":{"context":{"domain":"ONDC:NTS12","action":"publish","version":"1.0.0","provider_id":"All in One - Market Place","provider_uri":"https://api.example.com/api/rating/v1","publisher_id":"Rating Publisher on Ledger","publisher_uri":"https://api.publisher-example.com/api/rating/v1","transaction_id":"226c67bd-9aa7-4aef-8d62-c69e3a669ce1","message_id":"226c67bd-9aa7-4aef-8d62-c69e3a669d10","timestamp":"2021-06-29T10:52:01.620Z","ttl":"PT30S","location":{"country":{"code":"IND"}}},"message":{"entity_list":[{"entity_id":"a250a6db99213211f333db7f328085ae277c680d2c7178c4bc65cab9cdab78aa","rating_type":"Overall"}]}}}]}}}},"x-attributes":{"rating":{"attribute_set":{"publish":{"message":{"rating":{" entity_id\n":{"required":true,"type":"String","owner":"Provider","usage":"a250a6db99213211f333db7f328085ae277c680d2c7178c4bc65cab9cdab78aa","description":"Provides Persistent ID of the seller / entity, where this is generated based on the below formula. Hash(PREFIX:), Example: Hash(“GSTIN:22AAAAA0000A1Z5”), Hash(“PAN:XYZRN1234A”), Hash(“UIDAI:123412341234”) (in this order of availability of documents."}," entity_name\n":{"required":false,"type":"String","owner":"Provider","usage":"Gupta krishna Stores","description":"Name of the seller (note, uniqueness is determined by `entity_id` field)"}," rating_type\n":{"required":true,"type":"ENUM","owner":"Provider","usage":"Overall","description":"What is rated in this event: overall experience or just the delivery"}," count_of_txn\n":{"required":true,"type":"Integer","owner":"Provider","usage":100,"description":"total number of rating transactions"}," total_rating\n":{"required":true,"type":"Number","owner":"Provider","usage":200,"description":"total rating value (each rating transaction is done on the scale of 0-5)"}}},"context":{"location":{"country":{"code":{"required":"mandatory","type":"string","owner":"Provider","usage":"IND","description":"Describes country code as per ISO 3166-1 and ISO 3166-2 format"}}},"timestamp":{"required":"mandatory","type":"string","owner":"Provider","usage":"2023-03-23T04:41:16Z","description":"Describes tme of request generation in RFC3339 format"},"publisher_id":{"required":"mandatory","type":"string","owner":"Provider","usage":"api.example-publisher.com","description":"Describes subscriber ID of the Publisher"},"transaction_id":{"required":"mandatory","type":"string","owner":"Provider","usage":"6743e9e2","description":"Describes a unique value which persists across all API calls"},"message_id":{"required":"mandatory","type":"string","owner":"Provider","usage":"13ba8018f176","description":"Describes a unique value which persists during a request / callback cycle."},"version":{"required":"mandatory","type":"integer","owner":"Provider","usage":"1.0.0","description":"Describes the version of transaction protocol being used by the sender."},"action":{"required":"mandatory","type":"string","owner":"Provider","usage":"publish","description":"Describes the method being called by the sender and executed at the receiver."},"publisher_uri":{"required":"mandatory","type":"string","owner":"Provider","usage":"https://api.example-publisher.com/pilot/rating/v1","description":"Describes subscriber URL of the Publisher for accepting requests from Providers."},"ttl":{"required":"mandatory","type":"string","owner":"Provider","usage":"PT30S","description":"Describes the duration in ISO8601 format after timestamp for which this message holds valid"},"provider_uri":{"required":"mandatory","type":"string","owner":"Provider","usage":"https://api.example-provider.com/pilot/rating/v1","description":"Describes subscriber URL of the Provider for accepting callbacks from Publishers."},"provider_id":{"required":"mandatory","type":"string","owner":"Provider","usage":"api.example-provider.com","description":"Describes subscriber ID of the Provider"}}},"on_publish":{"message":{"status":{"required":true,"type":"Boolean","owner":"Publisher","usage":true,"description":"Describes the status of the publish"}},"context":{"location":{"country":{"code":{"required":"mandatory","type":"string","owner":"Provider","usage":"IND","description":"Describes country code as per ISO 3166-1 and ISO 3166-2 format"}}},"timestamp":{"required":"mandatory","type":"string","owner":"Publisher","usage":"2023-03-23T04:41:16Z","description":"Describes tme of request generation in RFC3339 format"},"publisher_id":{"required":"mandatory","type":"string","owner":"Provider","usage":"api.example-publisher.com","description":"Describes subscriber ID of the Publisher"},"transaction_id":{"required":"mandatory","type":"string","owner":"Provider","usage":"6743e9e2","description":"Describes a unique value which persists across all API calls"},"message_id":{"required":"mandatory","type":"string","owner":"Provider","usage":"13ba8018f176","description":"Describes a unique value which persists during a request / callback cycle."},"version":{"required":"mandatory","type":"integer","owner":"Provider","usage":"1.0.0","description":"Describes the version of transaction protocol being used by the sender."},"action":{"required":"mandatory","type":"string","owner":"Publisher","usage":"on_publish","description":"Describes the method being called by the sender and executed at the receiver."},"publisher_uri":{"required":"mandatory","type":"string","owner":"Provider","usage":"https://api.example-publisher.com/pilot/rating/v1","description":"Describes subscriber URL of the Publisher for accepting requests from Providers."},"ttl":{"required":"mandatory","type":"string","owner":"Provider","usage":"PT30S","description":"Describes the duration in ISO8601 format after timestamp for which this message holds valid"},"provider_uri":{"required":"mandatory","type":"string","owner":"Provider","usage":"https://api.example-provider.com/pilot/rating/v1","description":"Describes subscriber URL of the Provider for accepting callbacks from Publishers."},"provider_id":{"required":"mandatory","type":"string","owner":"Provider","usage":"api.example-provider.com","description":"Describes subscriber ID of the Provider"}}},"revise":{"message":{"rating":{" entity_id\n":{"required":true,"type":"String","owner":"Provider","usage":"a250a6db99213211f333db7f328085ae277c680d2c7178c4bc65cab9cdab78aa","description":"Provides Persistent ID of the seller / entity, where this is generated based on the below formula. Hash(PREFIX:), Example: Hash(“GSTIN:22AAAAA0000A1Z5”), Hash(“PAN:XYZRN1234A”), Hash(“UIDAI:123412341234”) (in this order of availability of documents."}," rating_type\n":{"required":true,"type":"ENUM","owner":"Provider","usage":"Overall","description":"What is revised in this event: overall experience or just the delivery"}," count_of_txn\n":{"required":true,"type":"Integer","owner":"Provider","usage":100,"description":"total number of rating transactions"}," total_rating\n":{"required":true,"type":"Number","owner":"Provider","usage":200,"description":"total rating value (each rating transaction is done on the scale of 0-5)"}}},"context":{"location":{"country":{"code":{"required":"mandatory","type":"string","owner":"Provider","usage":"IND","description":"Describes country code as per ISO 3166-1 and ISO 3166-2 format"}}},"timestamp":{"required":"mandatory","type":"string","owner":"Provider","usage":"2023-03-23T04:41:16Z","description":"Describes tme of request generation in RFC3339 format"},"publisher_id":{"required":"mandatory","type":"string","owner":"Provider","usage":"api.example-publisher.com","description":"Describes subscriber ID of the Publisher"},"transaction_id":{"required":"mandatory","type":"string","owner":"Provider","usage":"6743e9e2","description":"Describes a unique value which persists across all API calls"},"message_id":{"required":"mandatory","type":"string","owner":"Provider","usage":"13ba8018f176","description":"Describes a unique value which persists during a request / callback cycle."},"version":{"required":"mandatory","type":"integer","owner":"Provider","usage":"1.0.0","description":"Describes the version of transaction protocol being used by the sender."},"action":{"required":"mandatory","type":"string","owner":"Provider","usage":"revise","description":"Describes the method being called by the sender and executed at the receiver."},"publisher_uri":{"required":"mandatory","type":"string","owner":"Provider","usage":"https://api.example-publisher.com/pilot/rating/v1","description":"Describes subscriber URL of the Publisher for accepting requests from Providers."},"ttl":{"required":"mandatory","type":"string","owner":"Provider","usage":"PT30S","description":"Describes the duration in ISO8601 format after timestamp for which this message holds valid"},"provider_uri":{"required":"mandatory","type":"string","owner":"Provider","usage":"https://api.example-provider.com/pilot/rating/v1","description":"Describes subscriber URL of the Provider for accepting callbacks from Publishers."},"provider_id":{"required":"mandatory","type":"string","owner":"Provider","usage":"api.example-provider.com","description":"Describes subscriber ID of the Provider"}}},"on_revise":{"message":{"status":{"required":true,"type":"Boolean","owner":"Publisher","usage":true,"description":"Describes the status of the publish"}},"context":{"location":{"country":{"code":{"required":"mandatory","type":"string","owner":"Provider","usage":"IND","description":"Describes country code as per ISO 3166-1 and ISO 3166-2 format"}}},"timestamp":{"required":"mandatory","type":"string","owner":"Publisher","usage":"2023-03-23T04:41:16Z","description":"Describes tme of request generation in RFC3339 format"},"publisher_id":{"required":"mandatory","type":"string","owner":"Provider","usage":"api.example-publisher.com","description":"Describes subscriber ID of the Publisher"},"transaction_id":{"required":"mandatory","type":"string","owner":"Provider","usage":"6743e9e2","description":"Describes a unique value which persists across all API calls"},"message_id":{"required":"mandatory","type":"string","owner":"Provider","usage":"13ba8018f176","description":"Describes a unique value which persists during a request / callback cycle."},"version":{"required":"mandatory","type":"integer","owner":"Provider","usage":"1.0.0","description":"Describes the version of transaction protocol being used by the sender."},"action":{"required":"mandatory","type":"string","owner":"Publisher","usage":"on_revise","description":"Describes the method being called by the sender and executed at the receiver."},"publisher_uri":{"required":"mandatory","type":"string","owner":"Provider","usage":"https://api.example-publisher.com/pilot/rating/v1","description":"Describes subscriber URL of the Publisher for accepting requests from Providers."},"ttl":{"required":"mandatory","type":"string","owner":"Provider","usage":"PT30S","description":"Describes the duration in ISO8601 format after timestamp for which this message holds valid"},"provider_uri":{"required":"mandatory","type":"string","owner":"Provider","usage":"https://api.example-provider.com/pilot/rating/v1","description":"Describes subscriber URL of the Provider for accepting callbacks from Publishers."},"provider_id":{"required":"mandatory","type":"string","owner":"Provider","usage":"api.example-provider.com","description":"Describes subscriber ID of the Provider"}}},"query":{"message":{" entity_list":{"entity_id\n":{"required":true,"type":"String","owner":"Provider","usage":"a250a6db99213211f333db7f328085ae277c680d2c7178c4bc65cab9cdab78aa","description":"Provides Persistent ID of the seller / entity, where this is generated based on the below formula. Hash(PREFIX:), Example: Hash(“GSTIN:22AAAAA0000A1Z5”), Hash(“PAN:XYZRN1234A”), Hash(“UIDAI:123412341234”) (in this order of availability of documents."}," rating_type\n\n":{"required":true,"type":"Enum","owner":"Provider","usage":"Overall","description":"Describes the type of rating like overall or just the delivery"}}},"context":{"location":{"country":{"code":{"required":"mandatory","type":"string","owner":"Provider","usage":"IND","description":"Describes country code as per ISO 3166-1 and ISO 3166-2 format"}}},"timestamp":{"required":"mandatory","type":"string","owner":"Provider","usage":"2023-03-23T04:41:16Z","description":"Describes tme of request generation in RFC3339 format"},"publisher_id":{"required":"mandatory","type":"string","owner":"Provider","usage":"api.example-publisher.com","description":"Describes subscriber ID of the Publisher"},"transaction_id":{"required":"mandatory","type":"string","owner":"Provider","usage":"6743e9e2","description":"Describes a unique value which persists across all API calls"},"message_id":{"required":"mandatory","type":"string","owner":"Provider","usage":"13ba8018f176","description":"Describes a unique value which persists during a request / callback cycle."},"version":{"required":"mandatory","type":"integer","owner":"Provider","usage":"1.0.0","description":"Describes the version of transaction protocol being used by the sender."},"action":{"required":"mandatory","type":"string","owner":"Provider","usage":"query","description":"Describes the method being called by the sender and executed at the receiver."},"publisher_uri":{"required":"mandatory","type":"string","owner":"Provider","usage":"https://api.example-publisher.com/pilot/rating/v1","description":"Describes subscriber URL of the Publisher for accepting requests from Providers."},"ttl":{"required":"mandatory","type":"string","owner":"Provider","usage":"PT30S","description":"Describes the duration in ISO8601 format after timestamp for which this message holds valid"},"provider_uri":{"required":"mandatory","type":"string","owner":"Provider","usage":"https://api.example-provider.com/pilot/rating/v1","description":"Describes subscriber URL of the Provider for accepting callbacks from Publishers."},"provider_id":{"required":"mandatory","type":"string","owner":"Provider","usage":"api.example-provider.com","description":"Describes subscriber ID of the Provider"}}},"on_query":{"message":{" scores":{" entity_id\n\n":{"required":true,"type":"String","owner":"Publisher","usage":"a250a6db99213211f333db7f328085ae277c680d2c7178c4bc65cab9cdab78aa","description":"Describes the ID of the seller "}," entity_name\n":{"required":true,"type":"String","owner":"Publisher","usage":"Gupta Krishna Store","description":"Describes the name of the seller"}," score\n":{"required":true,"type":"Number","owner":"Publisher","usage":1.5,"description":"Describes the aggregate score"}," total_rating\n":{"required":true,"type":"Number","owner":"Publisher","usage":200,"description":"Describes the total rating"}},"rating":{" count_of_txn\n":{"required":true,"type":"Integer","owner":"Publisher","usage":150,"description":"Describes the total number of transactions"}}},"context":{"location":{"country":{"code":{"required":"mandatory","type":"string","owner":"Provider","usage":"IND","description":"Describes country code as per ISO 3166-1 and ISO 3166-2 format"}}},"timestamp":{"required":"mandatory","type":"string","owner":"Publisher","usage":"2023-03-23T04:41:16Z","description":"Describes tme of request generation in RFC3339 format"},"publisher_id":{"required":"mandatory","type":"string","owner":"Provider","usage":"api.example-publisher.com","description":"Describes subscriber ID of the Publisher"},"transaction_id":{"required":"mandatory","type":"string","owner":"Provider","usage":"6743e9e2","description":"Describes a unique value which persists across all API calls"},"message_id":{"required":"mandatory","type":"string","owner":"Provider","usage":"13ba8018f176","description":"Describes a unique value which persists during a request / callback cycle."},"version":{"required":"mandatory","type":"integer","owner":"Provider","usage":"1.0.0","description":"Describes the version of transaction protocol being used by the sender."},"action":{"required":"mandatory","type":"string","owner":"Publisher","usage":"on_query","description":"Describes the method being called by the sender and executed at the receiver."},"publisher_uri":{"required":"mandatory","type":"string","owner":"Provider","usage":"https://api.example-publisher.com/pilot/rating/v1","description":"Describes subscriber URL of the Publisher for accepting requests from Providers."},"ttl":{"required":"mandatory","type":"string","owner":"Provider","usage":"PT30S","description":"Describes the duration in ISO8601 format after timestamp for which this message holds valid"},"provider_uri":{"required":"mandatory","type":"string","owner":"Provider","usage":"https://api.example-provider.com/pilot/rating/v1","description":"Describes subscriber URL of the Provider for accepting callbacks from Publishers."},"provider_id":{"required":"mandatory","type":"string","owner":"Provider","usage":"api.example-provider.com","description":"Describes subscriber ID of the Provider"}}}}}}} \ No newline at end of file