add error statement for context
This commit is contained in:
16
pkg/plugin/definition/validator.go
Normal file
16
pkg/plugin/definition/validator.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package definition
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/url"
|
||||
)
|
||||
|
||||
// SchemaValidator interface for schema validation.
|
||||
type SchemaValidator interface {
|
||||
Validate(ctx context.Context, url *url.URL, payload []byte) error
|
||||
}
|
||||
|
||||
// SchemaValidatorProvider interface for creating validators.
|
||||
type SchemaValidatorProvider interface {
|
||||
New(ctx context.Context, config map[string]string) (SchemaValidator, func() error, error)
|
||||
}
|
||||
Binary file not shown.
33
pkg/plugin/implementation/schemaValidator/cmd/plugin.go
Normal file
33
pkg/plugin/implementation/schemaValidator/cmd/plugin.go
Normal file
@@ -0,0 +1,33 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
|
||||
definition "github.com/beckn/beckn-onix/pkg/plugin/definition"
|
||||
schemaValidator "github.com/beckn/beckn-onix/pkg/plugin/implementation/schemaValidator"
|
||||
)
|
||||
|
||||
// schemaValidatorProvider provides instances of schemaValidator.
|
||||
type schemaValidatorProvider struct{}
|
||||
|
||||
// New initializes a new Verifier instance.
|
||||
func (vp schemaValidatorProvider) New(ctx context.Context, config map[string]string) (definition.SchemaValidator, func() error, error) {
|
||||
if ctx == nil {
|
||||
return nil, nil, errors.New("context cannot be nil")
|
||||
}
|
||||
|
||||
// Extract schema_dir from the config map
|
||||
schemaDir, ok := config["schema_dir"]
|
||||
if !ok || schemaDir == "" {
|
||||
return nil, nil, errors.New("config must contain 'schema_dir'")
|
||||
}
|
||||
|
||||
// Create a new schemaValidator instance with the provided configuration
|
||||
return schemaValidator.New(ctx, &schemaValidator.Config{
|
||||
SchemaDir: schemaDir,
|
||||
})
|
||||
}
|
||||
|
||||
// Provider is the exported symbol that the plugin manager will look for.
|
||||
var Provider definition.SchemaValidatorProvider = schemaValidatorProvider{}
|
||||
160
pkg/plugin/implementation/schemaValidator/cmd/plugin_test.go
Normal file
160
pkg/plugin/implementation/schemaValidator/cmd/plugin_test.go
Normal file
@@ -0,0 +1,160 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
// setupTestSchema creates a temporary directory and writes a sample schema file.
|
||||
func setupTestSchema(t *testing.T) string {
|
||||
t.Helper()
|
||||
|
||||
// Create a temporary directory for the schema
|
||||
schemaDir, err := os.MkdirTemp("", "schemas")
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to create temp directory: %v", err)
|
||||
}
|
||||
|
||||
// Create the directory structure for the schema file
|
||||
schemaFilePath := filepath.Join(schemaDir, "example", "1.0", "test_schema.json")
|
||||
if err := os.MkdirAll(filepath.Dir(schemaFilePath), 0755); err != nil {
|
||||
t.Fatalf("Failed to create schema directory structure: %v", err)
|
||||
}
|
||||
|
||||
// Define a sample schema
|
||||
schemaContent := `{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"context": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"domain": {"type": "string"},
|
||||
"version": {"type": "string"}
|
||||
},
|
||||
"required": ["domain", "version"]
|
||||
}
|
||||
},
|
||||
"required": ["context"]
|
||||
}`
|
||||
|
||||
// Write the schema to the file
|
||||
if err := os.WriteFile(schemaFilePath, []byte(schemaContent), 0644); err != nil {
|
||||
t.Fatalf("Failed to write schema file: %v", err)
|
||||
}
|
||||
|
||||
return schemaDir
|
||||
}
|
||||
|
||||
// TestValidatorProviderSuccess tests successful ValidatorProvider implementation.
|
||||
func TestValidatorProviderSuccess(t *testing.T) {
|
||||
schemaDir := setupTestSchema(t)
|
||||
defer os.RemoveAll(schemaDir)
|
||||
|
||||
// Define test cases.
|
||||
tests := []struct {
|
||||
name string
|
||||
ctx context.Context
|
||||
config map[string]string
|
||||
expectedError string
|
||||
}{
|
||||
{
|
||||
name: "Valid schema directory",
|
||||
ctx: context.Background(), // Valid context
|
||||
config: map[string]string{"schema_dir": schemaDir},
|
||||
expectedError: "",
|
||||
},
|
||||
}
|
||||
|
||||
// Test using table-driven tests
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
vp := schemaValidatorProvider{}
|
||||
schemaValidator, close, err := vp.New(tt.ctx, tt.config)
|
||||
|
||||
// Ensure no error occurred
|
||||
if err != nil {
|
||||
t.Errorf("unexpected error: %v", err)
|
||||
return
|
||||
}
|
||||
|
||||
// Ensure the schemaValidator is not nil
|
||||
if schemaValidator == nil {
|
||||
t.Error("expected a non-nil schemaValidator, got nil")
|
||||
}
|
||||
|
||||
// Ensure the close function is not nil
|
||||
if close == nil {
|
||||
t.Error("expected a non-nil close function, got nil")
|
||||
}
|
||||
|
||||
// Test the close function
|
||||
if err := close(); err != nil {
|
||||
t.Errorf("close function returned an error: %v", err)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// TestValidatorProviderSuccess tests cases where ValidatorProvider creation should fail.
|
||||
func TestValidatorProviderFailure(t *testing.T) {
|
||||
schemaDir := setupTestSchema(t)
|
||||
defer os.RemoveAll(schemaDir)
|
||||
|
||||
// Define test cases.
|
||||
tests := []struct {
|
||||
name string
|
||||
ctx context.Context
|
||||
config map[string]string
|
||||
expectedError string
|
||||
}{
|
||||
{
|
||||
name: "Config is empty",
|
||||
ctx: context.Background(),
|
||||
config: map[string]string{},
|
||||
expectedError: "config must contain 'schema_dir'",
|
||||
},
|
||||
{
|
||||
name: "schema_dir is empty",
|
||||
ctx: context.Background(),
|
||||
config: map[string]string{"schema_dir": ""},
|
||||
expectedError: "config must contain 'schema_dir'",
|
||||
},
|
||||
{
|
||||
name: "Invalid schema directory",
|
||||
ctx: context.Background(), // Valid context
|
||||
config: map[string]string{"schema_dir": "/invalid/dir"},
|
||||
expectedError: "failed to initialise schemaValidator: schema directory does not exist: /invalid/dir",
|
||||
},
|
||||
{
|
||||
name: "Nil context",
|
||||
ctx: nil, // Nil context
|
||||
config: map[string]string{"schema_dir": schemaDir},
|
||||
expectedError: "context cannot be nil",
|
||||
},
|
||||
}
|
||||
|
||||
// Test using table-driven tests
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
vp := schemaValidatorProvider{}
|
||||
_, _, err := vp.New(tt.ctx, tt.config)
|
||||
|
||||
// Check for expected error
|
||||
if tt.expectedError != "" {
|
||||
if err == nil || !strings.Contains(err.Error(), tt.expectedError) {
|
||||
t.Errorf("expected error %q, got %v", tt.expectedError, err)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// Ensure no error occurred
|
||||
if err != nil {
|
||||
t.Errorf("unexpected error: %v", err)
|
||||
return
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
273
pkg/plugin/implementation/schemaValidator/schemaValidator.go
Normal file
273
pkg/plugin/implementation/schemaValidator/schemaValidator.go
Normal file
@@ -0,0 +1,273 @@
|
||||
package schemavalidator
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/url"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
response "github.com/beckn/beckn-onix/pkg/response"
|
||||
|
||||
"github.com/santhosh-tekuri/jsonschema/v6"
|
||||
)
|
||||
|
||||
// Payload represents the structure of the data payload with context information.
|
||||
type payload struct {
|
||||
Context struct {
|
||||
Domain string `json:"domain"`
|
||||
Version string `json:"version"`
|
||||
Action string `json:"action"`
|
||||
BapID string `json:"bap_id"`
|
||||
BapURI string `json:"bap_uri"`
|
||||
BppID string `json:"bpp_id"`
|
||||
BppURI string `json:"bpp_uri"`
|
||||
MessageID string `json:"message_id"`
|
||||
TransactionID string `json:"transaction_id"`
|
||||
Timestamp string `json:"timestamp"`
|
||||
TTL string `json:"ttl"`
|
||||
Location Location `json:"location"`
|
||||
} `json:"context"`
|
||||
}
|
||||
|
||||
// Location represent the structure of the location in context
|
||||
type Location struct {
|
||||
Country struct {
|
||||
Code string `json:"code"`
|
||||
} `json:"country"`
|
||||
City struct {
|
||||
Code string `json:"code"`
|
||||
} `json:"city"`
|
||||
}
|
||||
|
||||
// SchemaValidator implements the Validator interface.
|
||||
type SchemaValidator struct {
|
||||
config *Config
|
||||
schemaCache map[string]*jsonschema.Schema
|
||||
}
|
||||
|
||||
// Config struct for SchemaValidator.
|
||||
type Config struct {
|
||||
SchemaDir string
|
||||
}
|
||||
|
||||
// New creates a new ValidatorProvider instance.
|
||||
func New(ctx context.Context, config *Config) (*SchemaValidator, func() error, error) {
|
||||
// Check if config is nil
|
||||
if config == nil {
|
||||
return nil, nil, fmt.Errorf("config cannot be nil")
|
||||
}
|
||||
v := &SchemaValidator{
|
||||
config: config,
|
||||
schemaCache: make(map[string]*jsonschema.Schema),
|
||||
}
|
||||
|
||||
// Call Initialise function to load schemas and get validators
|
||||
if err := v.initialise(); err != nil {
|
||||
return nil, nil, fmt.Errorf("failed to initialise schemaValidator: %v", err)
|
||||
}
|
||||
return v, v.Close, nil
|
||||
}
|
||||
|
||||
// Validate validates the given data against the schema.
|
||||
func (v *SchemaValidator) Validate(ctx context.Context, url *url.URL, data []byte) error {
|
||||
fmt.Println("inside validate function....")
|
||||
var payloadData payload
|
||||
err := json.Unmarshal(data, &payloadData)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to parse JSON payload: %v", err)
|
||||
}
|
||||
|
||||
if err := validateContext(payloadData); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Extract domain, version, and endpoint from the payload and uri.
|
||||
cxtDomain := payloadData.Context.Domain
|
||||
version := payloadData.Context.Version
|
||||
version = fmt.Sprintf("v%s", version)
|
||||
|
||||
endpoint := path.Base(url.String())
|
||||
// ToDo Add debug log here
|
||||
fmt.Println("Handling request for endpoint:", endpoint)
|
||||
domain := strings.ToLower(cxtDomain)
|
||||
domain = strings.ReplaceAll(domain, ":", "_")
|
||||
|
||||
// Construct the schema file name.
|
||||
schemaFileName := fmt.Sprintf("%s_%s_%s", domain, version, endpoint)
|
||||
|
||||
// Retrieve the schema from the cache.
|
||||
schema, exists := v.schemaCache[schemaFileName]
|
||||
if !exists {
|
||||
return fmt.Errorf("schema not found for domain: %s", schemaFileName)
|
||||
}
|
||||
|
||||
var jsonData any
|
||||
if err := json.Unmarshal(data, &jsonData); err != nil {
|
||||
return fmt.Errorf("failed to parse JSON data: %v", err)
|
||||
}
|
||||
err = schema.Validate(jsonData)
|
||||
if err != nil {
|
||||
// Handle schema validation errors
|
||||
if validationErr, ok := err.(*jsonschema.ValidationError); ok {
|
||||
// Convert validation errors into an array of SchemaValError
|
||||
var schemaErrors []response.Error
|
||||
for _, cause := range validationErr.Causes {
|
||||
// Extract the path and message from the validation error
|
||||
path := strings.Join(cause.InstanceLocation, ".") // JSON path to the invalid field
|
||||
message := cause.Error() // Validation error message
|
||||
|
||||
// Append the error to the schemaErrors array
|
||||
schemaErrors = append(schemaErrors, response.Error{
|
||||
Paths: path,
|
||||
Message: message,
|
||||
})
|
||||
}
|
||||
// Return the array of schema validation errors
|
||||
return &response.SchemaValidationErr{Errors: schemaErrors}
|
||||
}
|
||||
// Return a generic error for non-validation errors
|
||||
return fmt.Errorf("validation failed: %v", err)
|
||||
}
|
||||
|
||||
// Return nil if validation succeeds
|
||||
return nil
|
||||
}
|
||||
|
||||
func validateContext(p payload) error {
|
||||
// Validate the payload context fields FIRST
|
||||
if p.Context.Domain == "" {
|
||||
return fmt.Errorf("missing field Domain in context")
|
||||
}
|
||||
if p.Context.Version == "" {
|
||||
return fmt.Errorf("missing field Version in context")
|
||||
}
|
||||
if p.Context.Action == "" {
|
||||
return fmt.Errorf("missing field action in context")
|
||||
}
|
||||
if p.Context.BapID == "" {
|
||||
return fmt.Errorf("missing field bpp_id in context")
|
||||
}
|
||||
if p.Context.BapURI == "" {
|
||||
return fmt.Errorf("missing field bpp_uri in context")
|
||||
}
|
||||
if p.Context.BppID == "" {
|
||||
return fmt.Errorf("missing field bpp_id in context")
|
||||
}
|
||||
|
||||
if p.Context.BppURI == "" {
|
||||
return fmt.Errorf("missing field bpp_uri in context")
|
||||
}
|
||||
if p.Context.MessageID == "" {
|
||||
return fmt.Errorf("missing field message_id in context")
|
||||
}
|
||||
if p.Context.TransactionID == "" {
|
||||
return fmt.Errorf("missing field transaction_id in context")
|
||||
}
|
||||
if p.Context.Timestamp == "" {
|
||||
return fmt.Errorf("missing field timestamp in context")
|
||||
}
|
||||
if p.Context.TTL == "" {
|
||||
return fmt.Errorf("missing field ttl in context")
|
||||
}
|
||||
if p.Context.Location.Country.Code == "" {
|
||||
return fmt.Errorf("missing Location.Country.Code in context")
|
||||
}
|
||||
if p.Context.Location.City.Code == "" {
|
||||
return fmt.Errorf("missing field Location.City.Code in context")
|
||||
}
|
||||
return nil
|
||||
|
||||
}
|
||||
|
||||
// ValidatorProvider provides instances of Validator.
|
||||
type ValidatorProvider struct{}
|
||||
|
||||
// Initialise initialises the validator provider by compiling all the JSON schema files
|
||||
// from the specified directory and storing them in a cache indexed by their schema filenames.
|
||||
func (v *SchemaValidator) initialise() error {
|
||||
schemaDir := v.config.SchemaDir
|
||||
// Check if the directory exists and is accessible.
|
||||
info, err := os.Stat(schemaDir)
|
||||
if err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
return fmt.Errorf("schema directory does not exist: %s", schemaDir)
|
||||
}
|
||||
return fmt.Errorf("failed to access schema directory: %v", err)
|
||||
}
|
||||
if !info.IsDir() {
|
||||
return fmt.Errorf("provided schema path is not a directory: %s", schemaDir)
|
||||
}
|
||||
|
||||
compiler := jsonschema.NewCompiler()
|
||||
|
||||
// Helper function to process directories recursively.
|
||||
var processDir func(dir string) error
|
||||
processDir = func(dir string) error {
|
||||
entries, err := os.ReadDir(dir)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to read directory: %v", err)
|
||||
}
|
||||
|
||||
for _, entry := range entries {
|
||||
path := filepath.Join(dir, entry.Name())
|
||||
if entry.IsDir() {
|
||||
// Recursively process subdirectories.
|
||||
if err := processDir(path); err != nil {
|
||||
return err
|
||||
}
|
||||
} else if filepath.Ext(entry.Name()) == ".json" {
|
||||
// Process JSON files.
|
||||
compiledSchema, err := compiler.Compile(path)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to compile JSON schema from file %s: %v", entry.Name(), err)
|
||||
}
|
||||
|
||||
// Use relative path from schemaDir to avoid absolute paths and make schema keys domain/version specific.
|
||||
relativePath, err := filepath.Rel(schemaDir, path)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to get relative path for file %s: %v", entry.Name(), err)
|
||||
}
|
||||
// Split the relative path to get domain, version, and schema.
|
||||
parts := strings.Split(relativePath, string(os.PathSeparator))
|
||||
|
||||
// Ensure that the file path has at least 3 parts: domain, version, and schema file.
|
||||
if len(parts) < 3 {
|
||||
return fmt.Errorf("invalid schema file structure, expected domain/version/schema.json but got: %s", relativePath)
|
||||
}
|
||||
|
||||
// Extract domain, version, and schema filename from the parts.
|
||||
// Validate that the extracted parts are non-empty.
|
||||
domain := strings.TrimSpace(parts[0])
|
||||
version := strings.TrimSpace(parts[1])
|
||||
schemaFileName := strings.TrimSpace(parts[2])
|
||||
schemaFileName = strings.TrimSuffix(schemaFileName, ".json")
|
||||
|
||||
if domain == "" || version == "" || schemaFileName == "" {
|
||||
return fmt.Errorf("invalid schema file structure, one or more components are empty. Relative path: %s", relativePath)
|
||||
}
|
||||
|
||||
// Construct a unique key combining domain, version, and schema name (e.g., ondc_trv10_v2.0.0_schema).
|
||||
uniqueKey := fmt.Sprintf("%s_%s_%s", domain, version, schemaFileName)
|
||||
// Store the compiled schema in the SchemaCache using the unique key.
|
||||
v.schemaCache[uniqueKey] = compiledSchema
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Start processing from the root schema directory.
|
||||
if err := processDir(schemaDir); err != nil {
|
||||
return fmt.Errorf("failed to read schema directory: %v", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Close releases resources (mock implementation returning nil).
|
||||
func (v *SchemaValidator) Close() error {
|
||||
return nil
|
||||
}
|
||||
@@ -0,0 +1,369 @@
|
||||
package schemavalidator
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/url"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/santhosh-tekuri/jsonschema/v6"
|
||||
)
|
||||
|
||||
// setupTestSchema creates a temporary directory and writes a sample schema file.
|
||||
func setupTestSchema(t *testing.T) string {
|
||||
t.Helper()
|
||||
|
||||
// Create a temporary directory for the schema
|
||||
schemaDir, err := os.MkdirTemp("", "schemas")
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to create temp directory: %v", err)
|
||||
}
|
||||
|
||||
// Create the directory structure for the schema file
|
||||
schemaFilePath := filepath.Join(schemaDir, "example", "v1.0", "endpoint.json")
|
||||
if err := os.MkdirAll(filepath.Dir(schemaFilePath), 0755); err != nil {
|
||||
t.Fatalf("Failed to create schema directory structure: %v", err)
|
||||
}
|
||||
|
||||
// Define a sample schema
|
||||
schemaContent := `{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"context": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"domain": {"type": "string"},
|
||||
"version": {"type": "string"},
|
||||
"action": {"type": "string"}
|
||||
},
|
||||
"required": ["domain", "version", "action"]
|
||||
}
|
||||
},
|
||||
"required": ["context"]
|
||||
}`
|
||||
|
||||
// Write the schema to the file
|
||||
if err := os.WriteFile(schemaFilePath, []byte(schemaContent), 0644); err != nil {
|
||||
t.Fatalf("Failed to write schema file: %v", err)
|
||||
}
|
||||
|
||||
return schemaDir
|
||||
}
|
||||
|
||||
func TestValidator_Validate_Success(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
url string
|
||||
payload string
|
||||
wantErr bool
|
||||
}{
|
||||
{
|
||||
name: "Valid payload",
|
||||
url: "http://example.com/endpoint",
|
||||
payload: `{"context": {"domain": "example", "version": "1.0", "action": "endpoint"}}`,
|
||||
wantErr: false,
|
||||
},
|
||||
}
|
||||
|
||||
// Setup a temporary schema directory for testing
|
||||
schemaDir := setupTestSchema(t)
|
||||
defer os.RemoveAll(schemaDir)
|
||||
|
||||
config := &Config{SchemaDir: schemaDir}
|
||||
v, _, err := New(context.Background(), config)
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to create validator: %v", err)
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
u, _ := url.Parse(tt.url)
|
||||
err := v.Validate(context.Background(), u, []byte(tt.payload))
|
||||
if err != nil {
|
||||
t.Errorf("Unexpected error: %v", err)
|
||||
} else {
|
||||
t.Logf("Test %s passed with no errors", tt.name)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestValidator_Validate_Failure(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
url string
|
||||
payload string
|
||||
wantErr string
|
||||
}{
|
||||
{
|
||||
name: "Invalid JSON payload",
|
||||
url: "http://example.com/endpoint",
|
||||
payload: `{"context": {"domain": "example", "version": "1.0"`,
|
||||
wantErr: "failed to parse JSON payload",
|
||||
},
|
||||
{
|
||||
name: "Schema validation failure",
|
||||
url: "http://example.com/endpoint",
|
||||
payload: `{"context": {"domain": "example", "version": "1.0"}}`,
|
||||
wantErr: "context: at '/context': missing property 'action'",
|
||||
},
|
||||
{
|
||||
name: "Schema not found",
|
||||
url: "http://example.com/unknown_endpoint",
|
||||
payload: `{"context": {"domain": "example", "version": "1.0"}}`,
|
||||
wantErr: "schema not found for domain",
|
||||
},
|
||||
}
|
||||
|
||||
// Setup a temporary schema directory for testing
|
||||
schemaDir := setupTestSchema(t)
|
||||
defer os.RemoveAll(schemaDir)
|
||||
|
||||
config := &Config{SchemaDir: schemaDir}
|
||||
v, _, err := New(context.Background(), config)
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to create validator: %v", err)
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
u, _ := url.Parse(tt.url)
|
||||
err := v.Validate(context.Background(), u, []byte(tt.payload))
|
||||
if tt.wantErr != "" {
|
||||
if err == nil {
|
||||
t.Errorf("Expected error containing '%s', but got nil", tt.wantErr)
|
||||
} else if !strings.Contains(err.Error(), tt.wantErr) {
|
||||
t.Errorf("Expected error containing '%s', but got '%v'", tt.wantErr, err)
|
||||
} else {
|
||||
t.Logf("Test %s passed with expected error: %v", tt.name, err)
|
||||
}
|
||||
} else {
|
||||
if err != nil {
|
||||
t.Errorf("Unexpected error: %v", err)
|
||||
} else {
|
||||
t.Logf("Test %s passed with no errors", tt.name)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestValidator_Initialise(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
setupFunc func(schemaDir string) error
|
||||
wantErr string
|
||||
}{
|
||||
{
|
||||
name: "Schema directory does not exist",
|
||||
setupFunc: func(schemaDir string) error {
|
||||
// Do not create the schema directory
|
||||
return nil
|
||||
|
||||
},
|
||||
wantErr: "schema directory does not exist",
|
||||
},
|
||||
{
|
||||
name: "Schema path is not a directory",
|
||||
setupFunc: func(schemaDir string) error {
|
||||
// Create a file instead of a directory
|
||||
return os.WriteFile(schemaDir, []byte{}, 0644)
|
||||
},
|
||||
wantErr: "provided schema path is not a directory",
|
||||
},
|
||||
{
|
||||
name: "Invalid schema file structure",
|
||||
setupFunc: func(schemaDir string) error {
|
||||
// Create an invalid schema file structure
|
||||
invalidSchemaFile := filepath.Join(schemaDir, "invalid_schema.json")
|
||||
if err := os.MkdirAll(filepath.Dir(invalidSchemaFile), 0755); err != nil {
|
||||
t.Fatalf("Failed to create directory: %v", err)
|
||||
}
|
||||
return os.WriteFile(invalidSchemaFile, []byte(`{}`), 0644)
|
||||
},
|
||||
wantErr: "invalid schema file structure",
|
||||
},
|
||||
{
|
||||
name: "Failed to compile JSON schema",
|
||||
setupFunc: func(schemaDir string) error {
|
||||
// Create a schema file with invalid JSON
|
||||
invalidSchemaFile := filepath.Join(schemaDir, "example", "1.0", "endpoint.json")
|
||||
if err := os.MkdirAll(filepath.Dir(invalidSchemaFile), 0755); err != nil {
|
||||
t.Fatalf("Failed to create directory: %v", err)
|
||||
}
|
||||
return os.WriteFile(invalidSchemaFile, []byte(`{invalid json}`), 0644)
|
||||
},
|
||||
wantErr: "failed to compile JSON schema",
|
||||
},
|
||||
{
|
||||
name: "Invalid schema file structure with empty components",
|
||||
setupFunc: func(schemaDir string) error {
|
||||
// Create a schema file with empty domain, version, or schema name
|
||||
invalidSchemaFile := filepath.Join(schemaDir, "", "1.0", "endpoint.json")
|
||||
if err := os.MkdirAll(filepath.Dir(invalidSchemaFile), 0755); err != nil {
|
||||
t.Fatalf("Failed to create directory: %v", err)
|
||||
}
|
||||
return os.WriteFile(invalidSchemaFile, []byte(`{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"context": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"domain": {"type": "string"},
|
||||
"version": {"type": "string"}
|
||||
},
|
||||
"required": ["domain", "version"]
|
||||
}
|
||||
},
|
||||
"required": ["context"]
|
||||
}`), 0644)
|
||||
},
|
||||
wantErr: "failed to read schema directory: invalid schema file structure, expected domain/version/schema.json but got: 1.0/endpoint.json",
|
||||
},
|
||||
{
|
||||
name: "Failed to read directory",
|
||||
setupFunc: func(schemaDir string) error {
|
||||
// Create a directory and remove read permissions
|
||||
if err := os.MkdirAll(schemaDir, 0000); err != nil {
|
||||
t.Fatalf("Failed to create directory: %v", err)
|
||||
}
|
||||
return nil
|
||||
},
|
||||
wantErr: "failed to read directory",
|
||||
},
|
||||
{
|
||||
name: "Valid schema directory",
|
||||
setupFunc: func(schemaDir string) error {
|
||||
// Create a valid schema file
|
||||
validSchemaFile := filepath.Join(schemaDir, "example", "1.0", "endpoint.json")
|
||||
if err := os.MkdirAll(filepath.Dir(validSchemaFile), 0755); err != nil {
|
||||
t.Fatalf("Failed to create directory: %v", err)
|
||||
}
|
||||
return os.WriteFile(validSchemaFile, []byte(`{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"context": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"domain": {"type": "string"},
|
||||
"version": {"type": "string"}
|
||||
},
|
||||
"required": ["domain", "version"]
|
||||
}
|
||||
},
|
||||
"required": ["context"]
|
||||
}`), 0644)
|
||||
},
|
||||
wantErr: "",
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
// Setup a temporary schema directory for testing
|
||||
schemaDir := filepath.Join(os.TempDir(), "schemas")
|
||||
defer os.RemoveAll(schemaDir)
|
||||
|
||||
// Run the setup function to prepare the test case
|
||||
if err := tt.setupFunc(schemaDir); err != nil {
|
||||
t.Fatalf("setupFunc() error = %v", err)
|
||||
}
|
||||
|
||||
config := &Config{SchemaDir: schemaDir}
|
||||
v := &SchemaValidator{
|
||||
config: config,
|
||||
schemaCache: make(map[string]*jsonschema.Schema),
|
||||
}
|
||||
|
||||
err := v.initialise()
|
||||
if (err != nil && !strings.Contains(err.Error(), tt.wantErr)) || (err == nil && tt.wantErr != "") {
|
||||
t.Errorf("Error: initialise() returned error = %v, expected error = %v", err, tt.wantErr)
|
||||
} else if err == nil {
|
||||
t.Logf("Test %s passed: validator initialized successfully", tt.name)
|
||||
} else {
|
||||
t.Logf("Test %s passed with expected error: %v", tt.name, err)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestValidator_New_Success(t *testing.T) {
|
||||
schemaDir := setupTestSchema(t)
|
||||
defer os.RemoveAll(schemaDir)
|
||||
|
||||
config := &Config{SchemaDir: schemaDir}
|
||||
_, _, err := New(context.Background(), config)
|
||||
if err != nil {
|
||||
t.Errorf("Unexpected error: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestValidator_New_Failure(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
config *Config
|
||||
setupFunc func(schemaDir string) error
|
||||
wantErr string
|
||||
}{
|
||||
{
|
||||
name: "Config is nil",
|
||||
config: nil,
|
||||
setupFunc: func(schemaDir string) error {
|
||||
return nil
|
||||
},
|
||||
wantErr: "config cannot be nil",
|
||||
},
|
||||
// {
|
||||
// name: "Config is empty",
|
||||
// config: &Config{},
|
||||
// setupFunc: func(schemaDir string) error {
|
||||
// return nil
|
||||
// },
|
||||
// wantErr: "config must contain 'schema_dir'",
|
||||
// },
|
||||
// {
|
||||
// name: "schema_dir is empty",
|
||||
// config: &Config{SchemaDir: ""},
|
||||
// setupFunc: func(schemaDir string) error {
|
||||
// return nil
|
||||
// },
|
||||
// wantErr: "config must contain 'schema_dir'",
|
||||
// },
|
||||
{
|
||||
name: "Failed to initialise validators",
|
||||
config: &Config{
|
||||
SchemaDir: "/invalid/path",
|
||||
},
|
||||
setupFunc: func(schemaDir string) error {
|
||||
// Do not create the schema directory
|
||||
return nil
|
||||
},
|
||||
wantErr: "ailed to initialise schemaValidator: schema directory does not exist: /invalid/path",
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
// Run the setup function if provided
|
||||
if tt.setupFunc != nil {
|
||||
schemaDir := ""
|
||||
if tt.config != nil {
|
||||
schemaDir = tt.config.SchemaDir
|
||||
}
|
||||
if err := tt.setupFunc(schemaDir); err != nil {
|
||||
t.Fatalf("Setup function failed: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
// Call the New function with the test config
|
||||
_, _, err := New(context.Background(), tt.config)
|
||||
if (err != nil && !strings.Contains(err.Error(), tt.wantErr)) || (err == nil && tt.wantErr != "") {
|
||||
t.Errorf("Error: New() returned error = %v, expected error = %v", err, tt.wantErr)
|
||||
} else {
|
||||
t.Logf("Test %s passed with expected error: %v", tt.name, err)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package plugin
|
||||
|
||||
import (
|
||||
"beckn-onix/shared/plugin/definition"
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
@@ -9,33 +8,46 @@ import (
|
||||
"plugin"
|
||||
"strings"
|
||||
|
||||
"github.com/beckn/beckn-onix/pkg/plugin/definition"
|
||||
|
||||
"gopkg.in/yaml.v2"
|
||||
)
|
||||
|
||||
// ValidationPluginConfig represents configuration details for a plugin.
|
||||
type ValidationPluginConfig struct {
|
||||
ID string `yaml:"id"`
|
||||
Schema SchemaDetails `yaml:"config"`
|
||||
PluginPath string `yaml:"plugin_path"`
|
||||
// Config represents the plugin manager configuration.
|
||||
type Config struct {
|
||||
Root string `yaml:"root"`
|
||||
SchemaValidator PluginConfig `yaml:"schema_validator"`
|
||||
}
|
||||
|
||||
// PluginConfig represents configuration details for a plugin.
|
||||
type PluginConfig struct {
|
||||
ID string `yaml:"id"`
|
||||
Config map[string]string `yaml:"config"`
|
||||
}
|
||||
|
||||
// // ValidationPluginConfig represents configuration details for a plugin.
|
||||
// type ValidationPluginConfig struct {
|
||||
// ID string `yaml:"id"`
|
||||
// Schema SchemaDetails `yaml:"config"`
|
||||
// PluginPath string `yaml:"plugin_path"`
|
||||
// }
|
||||
|
||||
// SchemaDetails contains information about the plugin schema directory.
|
||||
type SchemaDetails struct {
|
||||
SchemaDir string `yaml:"schema_dir"`
|
||||
}
|
||||
|
||||
// Config represents the configuration for the application, including plugin configurations.
|
||||
type Config struct {
|
||||
Plugins struct {
|
||||
ValidationPlugin ValidationPluginConfig `yaml:"validation_plugin"`
|
||||
} `yaml:"plugins"`
|
||||
}
|
||||
// // Config represents the configuration for the application, including plugin configurations.
|
||||
// type Config struct {
|
||||
// Plugins struct {
|
||||
// ValidationPlugin ValidationPluginConfig `yaml:"validation_plugin"`
|
||||
// } `yaml:"plugins"`
|
||||
// }
|
||||
|
||||
// Manager handles dynamic plugin loading and management.
|
||||
type Manager struct {
|
||||
vp definition.ValidatorProvider
|
||||
validators map[string]definition.Validator
|
||||
cfg *Config
|
||||
vp definition.SchemaValidatorProvider
|
||||
cfg *Config
|
||||
}
|
||||
|
||||
// NewManager initializes a new Manager with the given configuration file.
|
||||
@@ -44,8 +56,8 @@ func NewManager(ctx context.Context, cfg *Config) (*Manager, error) {
|
||||
return nil, fmt.Errorf("configuration cannot be nil")
|
||||
}
|
||||
|
||||
// Load validator plugin
|
||||
vp, err := provider[definition.ValidatorProvider](cfg.Plugins.ValidationPlugin.PluginPath, cfg.Plugins.ValidationPlugin.ID)
|
||||
// Load schema validator plugin
|
||||
vp, err := provider[definition.SchemaValidatorProvider](cfg.Root, cfg.SchemaValidator.ID)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to load validator plugin: %w", err)
|
||||
}
|
||||
@@ -53,21 +65,21 @@ func NewManager(ctx context.Context, cfg *Config) (*Manager, error) {
|
||||
return nil, fmt.Errorf("validator provider is nil")
|
||||
}
|
||||
|
||||
// Initialize validator
|
||||
validatorMap, defErr := vp.New(ctx, map[string]string{
|
||||
"schema_dir": cfg.Plugins.ValidationPlugin.Schema.SchemaDir,
|
||||
})
|
||||
if defErr != (definition.Error{}) {
|
||||
return nil, fmt.Errorf("failed to initialize validator: %v", defErr)
|
||||
}
|
||||
// // Initialize validator
|
||||
// validatorMap, defErr := vp.New(ctx, map[string]string{
|
||||
// "schema_dir": cfg.Plugins.ValidationPlugin.Schema.SchemaDir,
|
||||
// })
|
||||
// if defErr != nil {
|
||||
// return nil, fmt.Errorf("failed to initialize validator: %v", defErr)
|
||||
// }
|
||||
|
||||
// Initialize the validators map
|
||||
validators := make(map[string]definition.Validator)
|
||||
for key, validator := range validatorMap {
|
||||
validators[key] = validator
|
||||
}
|
||||
// // Initialize the validators map
|
||||
// validators := make(map[string]definition.Validator)
|
||||
// for key, validator := range validatorMap {
|
||||
// validators[key] = validator
|
||||
// }
|
||||
|
||||
return &Manager{vp: vp, validators: validators, cfg: cfg}, nil
|
||||
return &Manager{vp: vp, cfg: cfg}, nil
|
||||
}
|
||||
|
||||
// provider loads a plugin dynamically and retrieves its provider instance.
|
||||
@@ -96,27 +108,23 @@ func provider[T any](path string, id string) (T, error) {
|
||||
return *prov, nil
|
||||
}
|
||||
|
||||
// pluginPath constructs the path to the plugin shared object file.
|
||||
// pluginPath constructs the path to the plugin pkg object file.
|
||||
func pluginPath(path, id string) string {
|
||||
return filepath.Join(path, id+".so")
|
||||
}
|
||||
|
||||
// Validators retrieves the validation plugin instances.
|
||||
func (m *Manager) Validators(ctx context.Context) (map[string]definition.Validator, definition.Error) {
|
||||
func (m *Manager) SchemaValidator(ctx context.Context) (definition.SchemaValidator, func() error, error) {
|
||||
if m.vp == nil {
|
||||
return nil, definition.Error{Message: "validator plugin provider not loaded"}
|
||||
return nil, nil, fmt.Errorf("schema validator plugin provider not loaded")
|
||||
|
||||
}
|
||||
configMap := map[string]string{
|
||||
"schema_dir": m.cfg.Plugins.ValidationPlugin.Schema.SchemaDir,
|
||||
}
|
||||
_, err := m.vp.New(ctx, configMap)
|
||||
if err != (definition.Error{}) {
|
||||
schemaValidator, close, err := m.vp.New(ctx, m.cfg.SchemaValidator.Config)
|
||||
if err != nil {
|
||||
|
||||
return nil, definition.Error{Message: fmt.Sprintf("failed to initialize validator: %v", err)}
|
||||
return nil, nil, fmt.Errorf("failed to initialize schema validator: %v", err)
|
||||
}
|
||||
|
||||
return m.validators, definition.Error{}
|
||||
return schemaValidator, close, nil
|
||||
}
|
||||
|
||||
// LoadConfig loads the configuration from a YAML file.
|
||||
14
pkg/plugin/plugin.yaml
Normal file
14
pkg/plugin/plugin.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
# plugins:
|
||||
# validation_plugin:
|
||||
# id: validator
|
||||
# config:
|
||||
# schema_dir: #Directory where the schema files are stored
|
||||
# plugin_path: shared/plugin/implementations/
|
||||
|
||||
|
||||
root: pkg/plugin/implementation/
|
||||
schema_validator:
|
||||
id: schemaValidator
|
||||
config:
|
||||
schema_dir: pkg/plugin/schemas #Directory where the schema files are stored
|
||||
plugin_path: pkg/plugin/implementation/
|
||||
32
pkg/plugin/schemas/core/v1.1.0/cancel.json
Normal file
32
pkg/plugin/schemas/core/v1.1.0/cancel.json
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "cancel",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"context": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "definitions.json#/$defs/Context"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"action": {
|
||||
"enum": [
|
||||
"cancel"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"action"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
},
|
||||
"required": [
|
||||
"message",
|
||||
"context"
|
||||
]
|
||||
}
|
||||
43
pkg/plugin/schemas/core/v1.1.0/confirm.json
Normal file
43
pkg/plugin/schemas/core/v1.1.0/confirm.json
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "confirm",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"context": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "definitions.json#/$defs/Context"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"action": {
|
||||
"enum": [
|
||||
"confirm"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"action"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"message": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"order": {
|
||||
"$ref": "definitions.json#/$defs/Order"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"order"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"message",
|
||||
"context"
|
||||
]
|
||||
}
|
||||
2459
pkg/plugin/schemas/core/v1.1.0/definitions.json
Normal file
2459
pkg/plugin/schemas/core/v1.1.0/definitions.json
Normal file
File diff suppressed because it is too large
Load Diff
43
pkg/plugin/schemas/core/v1.1.0/init.json
Normal file
43
pkg/plugin/schemas/core/v1.1.0/init.json
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "init",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"context": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "./definitions.json#/$defs/Context"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"action": {
|
||||
"enum": [
|
||||
"init"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"action"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"message": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"order": {
|
||||
"$ref": "./definitions.json#/$defs/Order"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"order"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"message",
|
||||
"context"
|
||||
]
|
||||
}
|
||||
46
pkg/plugin/schemas/core/v1.1.0/on_cancel.json
Normal file
46
pkg/plugin/schemas/core/v1.1.0/on_cancel.json
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "on_cancel",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"context": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "./definitions.json#/$defs/Context"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"action": {
|
||||
"enum": [
|
||||
"on_cancel"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"action"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"message": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"order": {
|
||||
"$ref": "./definitions.json#/$defs/Order"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"order"
|
||||
]
|
||||
},
|
||||
"error": {
|
||||
"$ref": "./definitions.json#/$defs/Error"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"context",
|
||||
"message"
|
||||
]
|
||||
}
|
||||
46
pkg/plugin/schemas/core/v1.1.0/on_confirm.json
Normal file
46
pkg/plugin/schemas/core/v1.1.0/on_confirm.json
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "on_confirm",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"context": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "./definitions.json#/$defs/Context"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"action": {
|
||||
"enum": [
|
||||
"on_confirm"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"action"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"message": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"order": {
|
||||
"$ref": "./definitions.json#/$defs/Order"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"order"
|
||||
]
|
||||
},
|
||||
"error": {
|
||||
"$ref": "./definitions.json#/$defs/Error"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"message",
|
||||
"context"
|
||||
]
|
||||
}
|
||||
46
pkg/plugin/schemas/core/v1.1.0/on_init.json
Normal file
46
pkg/plugin/schemas/core/v1.1.0/on_init.json
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "on_init",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"context": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "./definitions.json#/$defs/Context"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"action": {
|
||||
"enum": [
|
||||
"on_init"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"action"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"message": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"order": {
|
||||
"$ref": "./definitions.json#/$defs/Order"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"order"
|
||||
]
|
||||
},
|
||||
"error": {
|
||||
"$ref": "./definitions.json#/$defs/Error"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"message",
|
||||
"context"
|
||||
]
|
||||
}
|
||||
47
pkg/plugin/schemas/core/v1.1.0/on_rating.json
Normal file
47
pkg/plugin/schemas/core/v1.1.0/on_rating.json
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "on_rating",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"context": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "./definitions.json#/$defs/Context"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"action": {
|
||||
"enum": [
|
||||
"on_rating"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"action"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"message": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"feedback_form": {
|
||||
"description": "A feedback form to allow the user to provide additional information on the rating provided",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "./definitions.json#/$defs/XInput"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"error": {
|
||||
"$ref": "./definitions.json#/$defs/Error"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"context",
|
||||
"message"
|
||||
]
|
||||
}
|
||||
46
pkg/plugin/schemas/core/v1.1.0/on_search.json
Normal file
46
pkg/plugin/schemas/core/v1.1.0/on_search.json
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "on_search",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"context": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "./definitions.json#/$defs/Context"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"action": {
|
||||
"enum": [
|
||||
"on_search"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"action"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"message": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"catalog": {
|
||||
"$ref": "./definitions.json#/$defs/Catalog"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"catalog"
|
||||
]
|
||||
},
|
||||
"error": {
|
||||
"$ref": "./definitions.json#/$defs/Error"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"message",
|
||||
"context"
|
||||
]
|
||||
}
|
||||
43
pkg/plugin/schemas/core/v1.1.0/on_select.json
Normal file
43
pkg/plugin/schemas/core/v1.1.0/on_select.json
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "on_select",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"context": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "./definitions.json#/$defs/Context"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"action": {
|
||||
"enum": [
|
||||
"on_select"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"action"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"message": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"order": {
|
||||
"$ref": "./definitions.json#/$defs/Order"
|
||||
}
|
||||
}
|
||||
},
|
||||
"error": {
|
||||
"$ref": "./definitions.json#/$defs/Error"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"message",
|
||||
"context"
|
||||
]
|
||||
}
|
||||
46
pkg/plugin/schemas/core/v1.1.0/on_status.json
Normal file
46
pkg/plugin/schemas/core/v1.1.0/on_status.json
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "on_status",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"context": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "./definitions.json#/$defs/Context"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"action": {
|
||||
"enum": [
|
||||
"on_status"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"action"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"message": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"order": {
|
||||
"$ref": "./definitions.json#/$defs/Order"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"order"
|
||||
]
|
||||
},
|
||||
"error": {
|
||||
"$ref": "./definitions.json#/$defs/Error"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"message",
|
||||
"context"
|
||||
]
|
||||
}
|
||||
42
pkg/plugin/schemas/core/v1.1.0/on_support.json
Normal file
42
pkg/plugin/schemas/core/v1.1.0/on_support.json
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "on_support",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"context": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "./definitions.json#/$defs/Context"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"action": {
|
||||
"enum": [
|
||||
"on_support"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"action"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"message": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"support": {
|
||||
"$ref": "./definitions.json#/$defs/Support"
|
||||
}
|
||||
}
|
||||
},
|
||||
"error": {
|
||||
"$ref": "./definitions.json#/$defs/Error"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"context",
|
||||
"message"
|
||||
]
|
||||
}
|
||||
46
pkg/plugin/schemas/core/v1.1.0/on_track.json
Normal file
46
pkg/plugin/schemas/core/v1.1.0/on_track.json
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "on_track",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"context": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "./definitions.json#/$defs/Context"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"action": {
|
||||
"enum": [
|
||||
"on_track"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"action"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"message": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"tracking": {
|
||||
"$ref": "./definitions.json#/$defs/Tracking"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"tracking"
|
||||
]
|
||||
},
|
||||
"error": {
|
||||
"$ref": "./definitions.json#/$defs/Error"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"context",
|
||||
"message"
|
||||
]
|
||||
}
|
||||
46
pkg/plugin/schemas/core/v1.1.0/on_update.json
Normal file
46
pkg/plugin/schemas/core/v1.1.0/on_update.json
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "on_update",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"context": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "./definitions.json#/$defs/Context"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"action": {
|
||||
"enum": [
|
||||
"on_update"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"action"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"message": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"order": {
|
||||
"$ref": "./definitions.json#/$defs/Order"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"order"
|
||||
]
|
||||
},
|
||||
"error": {
|
||||
"$ref": "./definitions.json#/$defs/Error"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"message",
|
||||
"context"
|
||||
]
|
||||
}
|
||||
42
pkg/plugin/schemas/core/v1.1.0/rating.json
Normal file
42
pkg/plugin/schemas/core/v1.1.0/rating.json
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "rating",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"context": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "./definitions.json#/$defs/Context"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"action": {
|
||||
"enum": [
|
||||
"rating"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"action"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"message": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ratings": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "./definitions.json#/$defs/Rating"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"message",
|
||||
"context"
|
||||
]
|
||||
}
|
||||
7
pkg/plugin/schemas/core/v1.1.0/response.json
Normal file
7
pkg/plugin/schemas/core/v1.1.0/response.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "Response",
|
||||
"type": "object",
|
||||
"properties": {},
|
||||
"required": []
|
||||
}
|
||||
26
pkg/plugin/schemas/core/v1.1.0/search.json
Normal file
26
pkg/plugin/schemas/core/v1.1.0/search.json
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "search",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"context": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "./definitions.json#/$defs/Context"
|
||||
}
|
||||
]
|
||||
},
|
||||
"message": {
|
||||
"properties": {
|
||||
"intent": {
|
||||
"$ref": "./definitions.json#/$defs/Intent"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"message",
|
||||
"context"
|
||||
]
|
||||
}
|
||||
43
pkg/plugin/schemas/core/v1.1.0/select.json
Normal file
43
pkg/plugin/schemas/core/v1.1.0/select.json
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "select",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"context": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "./definitions.json#/$defs/Context"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"action": {
|
||||
"enum": [
|
||||
"select"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"action"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"message": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"order": {
|
||||
"$ref": "./definitions.json#/$defs/Order"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"order"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"message",
|
||||
"context"
|
||||
]
|
||||
}
|
||||
43
pkg/plugin/schemas/core/v1.1.0/status.json
Normal file
43
pkg/plugin/schemas/core/v1.1.0/status.json
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "status",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"context": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "./definitions.json#/$defs/Context"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"action": {
|
||||
"enum": [
|
||||
"status"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"action"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"message": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"ref_id": {
|
||||
"$ref": "./definitions.json#/$defs/Order"
|
||||
},
|
||||
"order_id": {
|
||||
"$ref": "./definitions.json#/$defs/Order"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"message",
|
||||
"context"
|
||||
]
|
||||
}
|
||||
39
pkg/plugin/schemas/core/v1.1.0/support.json
Normal file
39
pkg/plugin/schemas/core/v1.1.0/support.json
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "support",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"context": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "./definitions.json#/$defs/Context"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"action": {
|
||||
"enum": [
|
||||
"support"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"action"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"message": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"support": {
|
||||
"$ref": "./definitions.json#/$defs/Support"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"message",
|
||||
"context"
|
||||
]
|
||||
}
|
||||
47
pkg/plugin/schemas/core/v1.1.0/track.json
Normal file
47
pkg/plugin/schemas/core/v1.1.0/track.json
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "track",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"context": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "./definitions.json#/$defs/Context"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"action": {
|
||||
"enum": [
|
||||
"track"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"action"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"message": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"order_id": {
|
||||
"$ref": "./definitions.json#/$defs/Order"
|
||||
},
|
||||
"callback_url": {
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"order_id"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"message",
|
||||
"context"
|
||||
]
|
||||
}
|
||||
53
pkg/plugin/schemas/core/v1.1.0/update.json
Normal file
53
pkg/plugin/schemas/core/v1.1.0/update.json
Normal file
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "update",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"context": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "./definitions.json#/$defs/Context"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"action": {
|
||||
"enum": [
|
||||
"update"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"action"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"message": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"update_target": {
|
||||
"description": "Comma separated values of order objects being updated. For example: ```\"update_target\":\"item,billing,fulfillment\"```",
|
||||
"type": "string"
|
||||
},
|
||||
"order": {
|
||||
"description": "Updated order object",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "./definitions.json#/$defs/Order"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"update_target",
|
||||
"order"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"message",
|
||||
"context"
|
||||
]
|
||||
}
|
||||
40
pkg/plugin/schemas/ondc_trv10/v2.0.1/cancel.json
Normal file
40
pkg/plugin/schemas/ondc_trv10/v2.0.1/cancel.json
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "cancel",
|
||||
"type": "object",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "../../core/v1.1.0/cancel.json#"
|
||||
},
|
||||
{
|
||||
"$ref": "init.json#/allOf/2"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"order_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string",
|
||||
"enum": ["SOFT_CANCEL", "CONFIRM_CANCEL"]
|
||||
}
|
||||
},
|
||||
"required": ["code"]
|
||||
},
|
||||
"cancellation_reason_id": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9]+$"
|
||||
}
|
||||
},
|
||||
"required": ["order_id", "descriptor", "cancellation_reason_id"]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
463
pkg/plugin/schemas/ondc_trv10/v2.0.1/confirm.json
Normal file
463
pkg/plugin/schemas/ondc_trv10/v2.0.1/confirm.json
Normal file
@@ -0,0 +1,463 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "confirm",
|
||||
"type": "object",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "../../core/v1.1.0/confirm.json#"
|
||||
},
|
||||
{
|
||||
"$ref": "./init.json#/allOf/1"
|
||||
},
|
||||
{
|
||||
"$ref": "./init.json#/allOf/2"
|
||||
},
|
||||
{
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "./on_select.json#/allOf/5"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"message": {
|
||||
"properties": {
|
||||
"order": {
|
||||
"properties": {
|
||||
"fulfillments": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"allOf": [
|
||||
{
|
||||
"properties": {
|
||||
"customer": {
|
||||
"properties": {
|
||||
"contact": {
|
||||
"properties": {
|
||||
"phone": {
|
||||
"type": "string",
|
||||
"pattern": "^\\+?[1-9]\\d{1,14}$"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"phone"
|
||||
]
|
||||
},
|
||||
"person": {
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"contact",
|
||||
"person"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"customer"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "./init.json#/allOf/7"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"message": {
|
||||
"properties": {
|
||||
"order": {
|
||||
"properties": {
|
||||
"payments": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"amount": {
|
||||
"type": "string",
|
||||
"pattern": "^\\d+(\\.\\d{1,2})?$"
|
||||
}
|
||||
}
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"PRE-ORDER",
|
||||
"ON-FULFILLMENT",
|
||||
"POST-FULFILLMENT"
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"PAID",
|
||||
"NOT-PAID"
|
||||
]
|
||||
},
|
||||
"collected_by": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"BAP",
|
||||
"BPP"
|
||||
]
|
||||
},
|
||||
"tags": {
|
||||
"type": "array",
|
||||
"minItems": 2,
|
||||
"maxItems": 2,
|
||||
"uniqueItems": true,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"SETTLEMENT_TERMS",
|
||||
"BUYER_FINDER_FEES"
|
||||
]
|
||||
}
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "SETTLEMENT_TERMS"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"list": {
|
||||
"allOf": [
|
||||
{
|
||||
"contains": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "STATIC_TERMS"
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"contains": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "SETTLEMENT_BASIS"
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"DELIVERY"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"contains": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "SETTLEMENT_WINDOW"
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"contains": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "DELAY_INTEREST"
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"pattern": "^\\d+(\\.\\d{1,2})?$"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"contains": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "SETTLEMENT_TYPE"
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"upi",
|
||||
"neft",
|
||||
"rtgs",
|
||||
"UPI",
|
||||
"NEFT",
|
||||
"RTGS"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"contains": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "SETTLEMENT_AMOUNT"
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"pattern": "^\\d+(\\.\\d{1,2})?$"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"contains": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "MANDATORY_ARBITRATION"
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"true",
|
||||
"false"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"contains": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "COURT_JURISDICTION"
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "BUYER_FINDER_FEES"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"list": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"enum": [
|
||||
"BUYER_FINDER_FEES_PERCENTAGE"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"pattern": "^-?\\d+(\\.\\d+)?$"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"descriptor"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type",
|
||||
"status",
|
||||
"collected_by",
|
||||
"tags"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"message": {
|
||||
"properties": {
|
||||
"order": {
|
||||
"properties": {
|
||||
"payments": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"transaction_id": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type"
|
||||
],
|
||||
"allOf": [
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"type": {
|
||||
"const": "PRE-ORDER"
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"params": {
|
||||
"required": [
|
||||
"transaction_id"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"payments"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"message": {
|
||||
"properties": {
|
||||
"order": {
|
||||
"not": {
|
||||
"required": [
|
||||
"id"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
550
pkg/plugin/schemas/ondc_trv10/v2.0.1/init.json
Normal file
550
pkg/plugin/schemas/ondc_trv10/v2.0.1/init.json
Normal file
@@ -0,0 +1,550 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "init",
|
||||
"type": "object",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "../../core/v1.1.0/init.json#"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"context": {
|
||||
"type": "object",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "./search.json#/properties/context/allOf/0"
|
||||
},
|
||||
{
|
||||
|
||||
"required": [
|
||||
"bpp_id",
|
||||
"bpp_uri"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"message": {
|
||||
"properties": {
|
||||
"order": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"provider": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id"
|
||||
]
|
||||
},
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"provider",
|
||||
"items"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"$ref": "./confirm.json#/allOf/4"
|
||||
},
|
||||
{
|
||||
"$ref": "./on_select.json#/allOf/7"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"message": {
|
||||
"properties": {
|
||||
"order": {
|
||||
"required": [
|
||||
"fulfillments"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"order": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"payments": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"amount": {
|
||||
"type": "string",
|
||||
"pattern": "^\\d+(\\.\\d{1,2})?$"
|
||||
}
|
||||
}
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"PRE-ORDER",
|
||||
"ON-FULFILLMENT",
|
||||
"POST-FULFILLMENT"
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"PAID",
|
||||
"NOT-PAID"
|
||||
]
|
||||
},
|
||||
"collected_by": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"BAP",
|
||||
"BPP"
|
||||
]
|
||||
},
|
||||
"tags": {
|
||||
"type": "array",
|
||||
"minItems": 2,
|
||||
"maxItems": 2,
|
||||
"uniqueItems": true,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"SETTLEMENT_TERMS",
|
||||
"BUYER_FINDER_FEES"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"descriptor"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type",
|
||||
"status",
|
||||
"collected_by",
|
||||
"tags"
|
||||
],
|
||||
"allOf": [
|
||||
{
|
||||
"if": {
|
||||
"allOf": [
|
||||
{
|
||||
"properties": {
|
||||
"collected_by": {
|
||||
"const": "BAP"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"type": {
|
||||
"const": "PRE-ORDER"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"tags": {
|
||||
"items": {
|
||||
"if": {
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "SETTLEMENT_TERMS"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"list": {
|
||||
"allOf": [
|
||||
{
|
||||
"contains": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "STATIC_TERMS"
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"contains": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "SETTLEMENT_BASIS"
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"DELIVERY"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"contains": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "SETTLEMENT_WINDOW"
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"contains": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "DELAY_INTEREST"
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"pattern": "^\\d+(\\.\\d{1,2})?$"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"allOf": [
|
||||
{
|
||||
"properties": {
|
||||
"collected_by": {
|
||||
"const": "BPP"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"type": {
|
||||
"const": "PRE-ORDER"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"tags": {
|
||||
"items": {
|
||||
"if": {
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "SETTLEMENT_TERMS"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"list": {
|
||||
"allOf": [
|
||||
{
|
||||
"contains": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "STATIC_TERMS"
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"contains": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "SETTLEMENT_BASIS"
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"DELIVERY"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"contains": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "SETTLEMENT_WINDOW"
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"allOf": [
|
||||
{
|
||||
"properties": {
|
||||
"collected_by": {
|
||||
"const": "BPP"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"type": {
|
||||
"const": "ON-FULFILLMENT"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"tags": {
|
||||
"items": {
|
||||
"if": {
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "SETTLEMENT_TERMS"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"list": {
|
||||
"allOf": [
|
||||
{
|
||||
"contains": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "STATIC_TERMS"
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"contains": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "SETTLEMENT_BASIS"
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"DELIVERY"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"contains": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "SETTLEMENT_WINDOW"
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"contains": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "DELAY_INTEREST"
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"pattern": "^\\d+(\\.\\d{1,2})?$"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"message": {
|
||||
"properties": {
|
||||
"order": {
|
||||
"properties": {
|
||||
"billing": {
|
||||
"required": [
|
||||
"name"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"billing"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
13
pkg/plugin/schemas/ondc_trv10/v2.0.1/on_cancel.json
Normal file
13
pkg/plugin/schemas/ondc_trv10/v2.0.1/on_cancel.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "on_cancel",
|
||||
"type": "object",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "../../core/v1.1.0/on_cancel.json#"
|
||||
},
|
||||
{
|
||||
"$ref": "./init.json#/allOf/1"
|
||||
}
|
||||
]
|
||||
}
|
||||
314
pkg/plugin/schemas/ondc_trv10/v2.0.1/on_confirm.json
Normal file
314
pkg/plugin/schemas/ondc_trv10/v2.0.1/on_confirm.json
Normal file
@@ -0,0 +1,314 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "on_confirm",
|
||||
"type": "object",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "../../core/v1.1.0/on_confirm.json#"
|
||||
},
|
||||
{
|
||||
"$ref": "./init.json#/allOf/1"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"message": {
|
||||
"properties": {
|
||||
"order": {
|
||||
"properties": {
|
||||
"provider": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["id"]
|
||||
}
|
||||
},
|
||||
"required": ["provider"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"$ref": "./confirm.json#/allOf/5"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"message": {
|
||||
"properties": {
|
||||
"order": {
|
||||
"properties": {
|
||||
"items": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"fulfillment_ids": {
|
||||
"minItems": 1
|
||||
},
|
||||
"location_ids": {
|
||||
"minItems": 1
|
||||
}
|
||||
},
|
||||
"required": ["fulfillment_ids", "location_ids"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"$ref": "./confirm.json#/allOf/4/allOf/1"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"message": {
|
||||
"properties": {
|
||||
"order": {
|
||||
"properties": {
|
||||
"fulfillments": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["DELIVERY"]
|
||||
}
|
||||
},
|
||||
"required": ["type"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"allOf": [
|
||||
{
|
||||
"properties": {
|
||||
"message": {
|
||||
"properties": {
|
||||
"order": {
|
||||
"properties": {
|
||||
"quote": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"price": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"currency": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"pattern": "^\\d+(\\.\\d{1,2})?$"
|
||||
}
|
||||
},
|
||||
"required": ["currency", "value"]
|
||||
},
|
||||
"breakup": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"price": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"currency": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"pattern": "^\\d+(\\.\\d{1,2})?$"
|
||||
}
|
||||
},
|
||||
"required": ["currency", "value"]
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"BASE_FARE",
|
||||
"DISTANCE_FARE",
|
||||
"TAX",
|
||||
"DISCOUNT",
|
||||
"WAITING_CHARGE"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": ["price", "title"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": ["price", "breakup"]
|
||||
}
|
||||
},
|
||||
"required": ["quote"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"message": {
|
||||
"properties": {
|
||||
"order": {
|
||||
"properties": {
|
||||
"quote": {
|
||||
"properties": {
|
||||
"breakup": {
|
||||
"allOf": [
|
||||
{
|
||||
"contains": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"title": {
|
||||
"const": "BASE_FARE"
|
||||
},
|
||||
"price": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["value"]
|
||||
}
|
||||
},
|
||||
"required": ["title", "price"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"contains": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"title": {
|
||||
"const": "DISTANCE_FARE"
|
||||
},
|
||||
"price": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["value"]
|
||||
}
|
||||
},
|
||||
"required": ["title", "price"]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"$ref": "./confirm.json#/allOf/6"
|
||||
},
|
||||
{
|
||||
"allOf": [
|
||||
{
|
||||
"properties": {
|
||||
"message": {
|
||||
"properties": {
|
||||
"order": {
|
||||
"properties": {
|
||||
"cancellation_terms": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"fulfillment_state": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"RIDE_ASSIGNED",
|
||||
"RIDE_ENROUTE_PICKUP",
|
||||
"RIDE_ARRIVED_PICKUP",
|
||||
"RIDE_STARTED"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": ["code"]
|
||||
}
|
||||
},
|
||||
"required": ["descriptor"]
|
||||
},
|
||||
"cancellation_fee": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"percentage": {
|
||||
"type": "string",
|
||||
"pattern": "^(100(\\.0{1,2})?|([0-9]{1,2})(\\.\\d{1,2})?)$"
|
||||
}
|
||||
},
|
||||
"required": ["percentage"]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"amount": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"value": {
|
||||
"type": "string",
|
||||
"pattern": "^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)$"
|
||||
},
|
||||
"currency": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["currency", "value"]
|
||||
}
|
||||
},
|
||||
"required": ["amount"]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": ["fulfillment_state", "cancellation_fee"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": ["cancellation_terms"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"required": ["message"]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
317
pkg/plugin/schemas/ondc_trv10/v2.0.1/on_init.json
Normal file
317
pkg/plugin/schemas/ondc_trv10/v2.0.1/on_init.json
Normal file
@@ -0,0 +1,317 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "on_init",
|
||||
"type": "object",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "../../core/v1.1.0/on_init.json#"
|
||||
},
|
||||
{
|
||||
"$ref": "./init.json#/allOf/1"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"message": {
|
||||
"properties": {
|
||||
"order": {
|
||||
"properties": {
|
||||
"provider": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["id"]
|
||||
}
|
||||
},
|
||||
"required": ["provider"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"$ref": "./confirm.json#/allOf/5"
|
||||
},
|
||||
{
|
||||
"$ref": "./on_select.json#/allOf/6"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"message": {
|
||||
"properties": {
|
||||
"order": {
|
||||
"properties": {
|
||||
"items": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"fulfillment_ids": {
|
||||
"minItems": 1
|
||||
},
|
||||
"location_ids": {
|
||||
"minItems": 1
|
||||
}
|
||||
},
|
||||
"required": ["fulfillment_ids", "location_ids"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"$ref": "./confirm.json#/allOf/4/allOf/1"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"message": {
|
||||
"properties": {
|
||||
"order": {
|
||||
"properties": {
|
||||
"fulfillments": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["DELIVERY"]
|
||||
}
|
||||
},
|
||||
"required": ["type"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"allOf": [
|
||||
{
|
||||
"properties": {
|
||||
"message": {
|
||||
"properties": {
|
||||
"order": {
|
||||
"properties": {
|
||||
"quote": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"price": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"currency": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"pattern": "^\\d+(\\.\\d{1,2})?$"
|
||||
}
|
||||
},
|
||||
"required": ["currency", "value"]
|
||||
},
|
||||
"breakup": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"price": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"currency": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"pattern": "^\\d+(\\.\\d{1,2})?$"
|
||||
}
|
||||
},
|
||||
"required": ["currency", "value"]
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"BASE_FARE",
|
||||
"DISTANCE_FARE",
|
||||
"TAX",
|
||||
"DISCOUNT",
|
||||
"WAITING_CHARGE"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": ["price", "title"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": ["price", "breakup"]
|
||||
}
|
||||
},
|
||||
"required": ["quote"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"message": {
|
||||
"properties": {
|
||||
"order": {
|
||||
"properties": {
|
||||
"quote": {
|
||||
"properties": {
|
||||
"breakup": {
|
||||
"allOf": [
|
||||
{
|
||||
"contains": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"title": {
|
||||
"const": "BASE_FARE"
|
||||
},
|
||||
"price": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["value"]
|
||||
}
|
||||
},
|
||||
"required": ["title", "price"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"contains": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"title": {
|
||||
"const": "DISTANCE_FARE"
|
||||
},
|
||||
"price": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["value"]
|
||||
}
|
||||
},
|
||||
"required": ["title", "price"]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"$ref": "./confirm.json#/allOf/6"
|
||||
},
|
||||
{
|
||||
"allOf": [
|
||||
{
|
||||
"properties": {
|
||||
"message": {
|
||||
"properties": {
|
||||
"order": {
|
||||
"properties": {
|
||||
"cancellation_terms": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"fulfillment_state": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"RIDE_ASSIGNED",
|
||||
"RIDE_ENROUTE_PICKUP",
|
||||
"RIDE_ARRIVED_PICKUP",
|
||||
"RIDE_STARTED"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": ["code"]
|
||||
}
|
||||
},
|
||||
"required": ["descriptor"]
|
||||
},
|
||||
"cancellation_fee": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"percentage": {
|
||||
"type": "string",
|
||||
"pattern": "^(100(\\.0{1,2})?|([0-9]{1,2})(\\.\\d{1,2})?)$"
|
||||
}
|
||||
},
|
||||
"required": ["percentage"]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"amount": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"value": {
|
||||
"type": "string",
|
||||
"pattern": "^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)$"
|
||||
},
|
||||
"currency": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["currency", "value"]
|
||||
}
|
||||
},
|
||||
"required": ["amount"]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": ["fulfillment_state", "cancellation_fee"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": ["cancellation_terms"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"required": ["message"]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
13
pkg/plugin/schemas/ondc_trv10/v2.0.1/on_rating.json
Normal file
13
pkg/plugin/schemas/ondc_trv10/v2.0.1/on_rating.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "on_rating",
|
||||
"type": "object",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "../../core/v1.1.0/on_rating.json#"
|
||||
},
|
||||
{
|
||||
"$ref": "./init.json#/allOf/1"
|
||||
}
|
||||
]
|
||||
}
|
||||
644
pkg/plugin/schemas/ondc_trv10/v2.0.1/on_search.json
Normal file
644
pkg/plugin/schemas/ondc_trv10/v2.0.1/on_search.json
Normal file
@@ -0,0 +1,644 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "on_search",
|
||||
"type": "object",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "../../core/v1.1.0/on_search.json#"
|
||||
},
|
||||
{
|
||||
"$ref": "./init.json#/allOf/1"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"catalog": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"images": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"minItems": 1
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name"
|
||||
]
|
||||
},
|
||||
"providers": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"images": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"minItems": 1
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name"
|
||||
]
|
||||
},
|
||||
"fulfillments": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"vehicle": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"category": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"AUTO_RICKSHAW",
|
||||
"CAB"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"category"
|
||||
]
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"DELIVERY"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"vehicle",
|
||||
"type"
|
||||
]
|
||||
}
|
||||
},
|
||||
"items": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"code": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"RIDE"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
"price": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"value": {
|
||||
"type": "string",
|
||||
"pattern": "^-?\\d+(\\.\\d+)?$"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"value",
|
||||
"currency"
|
||||
]
|
||||
},
|
||||
"fulfillment_ids": {
|
||||
"type": "array",
|
||||
"minItems": 1
|
||||
},
|
||||
"payment_ids": {
|
||||
"type": "array",
|
||||
"minItems": 1
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"descriptor",
|
||||
"price",
|
||||
"fulfillment_ids"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"items",
|
||||
"fulfillments"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"providers"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"catalog"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"message": {
|
||||
"properties": {
|
||||
"order": {
|
||||
"properties": {
|
||||
"payments": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"collected_by": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"BAP",
|
||||
"BPP"
|
||||
]
|
||||
},
|
||||
"tags": {
|
||||
"type": "array",
|
||||
"minItems": 2,
|
||||
"maxItems": 2,
|
||||
"uniqueItems": true,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"SETTLEMENT_TERMS",
|
||||
"BUYER_FINDER_FEES"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"descriptor"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"collected_by",
|
||||
"tags"
|
||||
],
|
||||
"allOf": [
|
||||
{
|
||||
"if": {
|
||||
"allOf": [
|
||||
{
|
||||
"properties": {
|
||||
"collected_by": {
|
||||
"const": "BAP"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"tags": {
|
||||
"items": {
|
||||
"if": {
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "SETTLEMENT_TERMS"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"list": {
|
||||
"allOf": [
|
||||
{
|
||||
"contains": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "STATIC_TERMS"
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"contains": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "SETTLEMENT_TYPE"
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"upi",
|
||||
"neft",
|
||||
"rtgs",
|
||||
"UPI",
|
||||
"NEFT",
|
||||
"RTGS"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"contains": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "DELAY_INTEREST"
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"pattern": "^\\d+(\\.\\d{1,2})?$"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"contains": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "MANDATORY_ARBITRATION"
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"true",
|
||||
"false"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"contains": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "COURT_JURISDICTION"
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"allOf": [
|
||||
{
|
||||
"properties": {
|
||||
"collected_by": {
|
||||
"const": "BPP"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"tags": {
|
||||
"items": {
|
||||
"if": {
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "SETTLEMENT_TERMS"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"list": {
|
||||
"allOf": [
|
||||
{
|
||||
"contains": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "STATIC_TERMS"
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"contains": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "SETTLEMENT_TYPE"
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"upi",
|
||||
"neft",
|
||||
"rtgs",
|
||||
"UPI",
|
||||
"NEFT",
|
||||
"RTGS"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"contains": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "DELAY_INTEREST"
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"pattern": "^\\d+(\\.\\d{1,2})?$"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"contains": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "MANDATORY_ARBITRATION"
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"true",
|
||||
"false"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"contains": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "COURT_JURISDICTION"
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"contains": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "SETTLEMENT_BASIS"
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"DELIVERY"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"contains": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"const": "SETTLEMENT_WINDOW"
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"payments"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"message": {
|
||||
"properties": {
|
||||
"catalog": {
|
||||
"properties": {
|
||||
"providers": {
|
||||
"items": {
|
||||
"properties": {
|
||||
"fulfillments": {
|
||||
"items": {
|
||||
"properties": {
|
||||
"stops": {
|
||||
"allOf": [
|
||||
{
|
||||
"contains": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"location": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"gps": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"gps"
|
||||
]
|
||||
},
|
||||
"type": {
|
||||
"const": "START"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"location",
|
||||
"type"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"contains": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"location": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"gps": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"gps"
|
||||
]
|
||||
},
|
||||
"type": {
|
||||
"const": "END"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"location",
|
||||
"type"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"stops"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
227
pkg/plugin/schemas/ondc_trv10/v2.0.1/on_select.json
Normal file
227
pkg/plugin/schemas/ondc_trv10/v2.0.1/on_select.json
Normal file
@@ -0,0 +1,227 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "on_select",
|
||||
"type": "object",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "../../core/v1.1.0/on_select.json#"
|
||||
},
|
||||
{
|
||||
"$ref": "./init.json#/allOf/1"
|
||||
},
|
||||
{
|
||||
"$ref": "./on_init.json#/allOf/2"
|
||||
},
|
||||
{
|
||||
"$ref": "./on_init.json#/allOf/5"
|
||||
},
|
||||
{
|
||||
"allOf": [
|
||||
{
|
||||
"properties": {
|
||||
"message": {
|
||||
"properties": {
|
||||
"order": {
|
||||
"properties": {
|
||||
"fulfillments": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"required": ["id"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": ["fulfillments"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"message": {
|
||||
"properties": {
|
||||
"order": {
|
||||
"properties": {
|
||||
"fulfillments": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"state": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"RIDE_ASSIGNED",
|
||||
"RIDE_ENROUTE_PICKUP",
|
||||
"RIDE_ARRIVED_PICKUP",
|
||||
"RIDE_STARTED",
|
||||
"RIDE_ENDED",
|
||||
"RIDE_CANCELLED"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": ["code"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"message": {
|
||||
"properties": {
|
||||
"order": {
|
||||
"properties": {
|
||||
"fulfillments": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"properties": {
|
||||
"stops": {
|
||||
"items": {
|
||||
"properties": {
|
||||
"authorization": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["OTP"]
|
||||
},
|
||||
"token": {
|
||||
"type": "string",
|
||||
"pattern": "^-?\\d+(\\.\\d+)?$"
|
||||
}
|
||||
},
|
||||
"required": ["type", "token"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"message": {
|
||||
"properties": {
|
||||
"order": {
|
||||
"properties": {
|
||||
"fulfillments": {
|
||||
"items": {
|
||||
"properties": {
|
||||
"stops": {
|
||||
"type": "array",
|
||||
"minItems": 2,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"location": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"gps": { "type": "string" }
|
||||
},
|
||||
"required": ["gps"]
|
||||
},
|
||||
"type": {
|
||||
"enum": ["START", "END"]
|
||||
}
|
||||
},
|
||||
"required": ["location", "type"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": ["stops"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"message": {
|
||||
"properties": {
|
||||
"order": {
|
||||
"properties": {
|
||||
"fulfillments": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"vehicle": {
|
||||
"properties": {
|
||||
"category": {
|
||||
"type": "string",
|
||||
"enum": ["AUTO_RICKSHAW", "CAB"]
|
||||
}
|
||||
},
|
||||
"required": ["category"]
|
||||
}
|
||||
},
|
||||
"required": ["vehicle"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": ["fulfillments"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"$ref": "./on_init.json#/allOf/7"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"message": {
|
||||
"properties": {
|
||||
"order": {
|
||||
"properties": {
|
||||
"fulfillments": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"allOf": [
|
||||
{
|
||||
"not": {
|
||||
"required": ["agent"]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"$ref": "./on_init.json#/allOf/8"
|
||||
}
|
||||
]
|
||||
}
|
||||
13
pkg/plugin/schemas/ondc_trv10/v2.0.1/on_status.json
Normal file
13
pkg/plugin/schemas/ondc_trv10/v2.0.1/on_status.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "on_status",
|
||||
"type": "object",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "../../core/v1.1.0/on_status.json#"
|
||||
},
|
||||
{
|
||||
"$ref": "./init.json#/allOf/1"
|
||||
}
|
||||
]
|
||||
}
|
||||
13
pkg/plugin/schemas/ondc_trv10/v2.0.1/on_support.json
Normal file
13
pkg/plugin/schemas/ondc_trv10/v2.0.1/on_support.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "on_support",
|
||||
"type": "object",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "../../core/v1.1.0/on_support.json#"
|
||||
},
|
||||
{
|
||||
"$ref": "./init.json#/allOf/1"
|
||||
}
|
||||
]
|
||||
}
|
||||
13
pkg/plugin/schemas/ondc_trv10/v2.0.1/on_track.json
Normal file
13
pkg/plugin/schemas/ondc_trv10/v2.0.1/on_track.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "on_track",
|
||||
"type": "object",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "../../core/v1.1.0/on_track.json#"
|
||||
},
|
||||
{
|
||||
"$ref": "./init.json#/allOf/1"
|
||||
}
|
||||
]
|
||||
}
|
||||
13
pkg/plugin/schemas/ondc_trv10/v2.0.1/on_update.json
Normal file
13
pkg/plugin/schemas/ondc_trv10/v2.0.1/on_update.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "on_update",
|
||||
"type": "object",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "../../core/v1.1.0/on_update.json#"
|
||||
},
|
||||
{
|
||||
"$ref": "./init.json#/allOf/1"
|
||||
}
|
||||
]
|
||||
}
|
||||
13
pkg/plugin/schemas/ondc_trv10/v2.0.1/rating.json
Normal file
13
pkg/plugin/schemas/ondc_trv10/v2.0.1/rating.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "rating",
|
||||
"type": "object",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "../../core/v1.1.0/rating.json#"
|
||||
},
|
||||
{
|
||||
"$ref": "./init.json#/allOf/1"
|
||||
}
|
||||
]
|
||||
}
|
||||
146
pkg/plugin/schemas/ondc_trv10/v2.0.1/search.json
Normal file
146
pkg/plugin/schemas/ondc_trv10/v2.0.1/search.json
Normal file
@@ -0,0 +1,146 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "search",
|
||||
"allOf": [
|
||||
{ "$ref": "../../core/v1.1.0/search.json#" }
|
||||
],
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"context": {
|
||||
"type": "object",
|
||||
"allOf": [
|
||||
{
|
||||
"properties": {
|
||||
"action": {
|
||||
"type": "string"
|
||||
},
|
||||
"location": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"city": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": { "type": "string" }
|
||||
},
|
||||
"required": ["code"]
|
||||
},
|
||||
"country": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string",
|
||||
"enum": ["IND"]
|
||||
}
|
||||
},
|
||||
"required": ["code"]
|
||||
}
|
||||
},
|
||||
"required": ["city", "country"]
|
||||
},
|
||||
"bap_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"bpp_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"ttl": {
|
||||
"type": "string",
|
||||
"format": "duration"
|
||||
},
|
||||
"timestamp": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"location",
|
||||
"domain",
|
||||
"action",
|
||||
"message_id",
|
||||
"transaction_id",
|
||||
"timestamp",
|
||||
"bap_id",
|
||||
"bap_uri",
|
||||
"ttl"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"message": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"intent": {
|
||||
"allOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"payment": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"collected_by": {
|
||||
"type": "string",
|
||||
"enum": ["BPP", "BAP"]
|
||||
},
|
||||
"tags": {
|
||||
"type": "array",
|
||||
"minItems": 2,
|
||||
"maxItems": 2,
|
||||
"uniqueItems": true,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string",
|
||||
"enum": ["SETTLEMENT_TERMS", "BUYER_FINDER_FEES"]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": ["descriptor"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": ["collected_by"]
|
||||
},
|
||||
"fulfillment": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"stops": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"location": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"gps": { "type": "string" }
|
||||
},
|
||||
"required": ["gps"]
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["START", "END"]
|
||||
}
|
||||
},
|
||||
"required": ["location", "type"]
|
||||
},
|
||||
"minItems": 2
|
||||
}
|
||||
},
|
||||
"required": ["stops"]
|
||||
}
|
||||
},
|
||||
"required": ["payment", "fulfillment"]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": ["intent"]
|
||||
}
|
||||
},
|
||||
"required": ["context", "message"]
|
||||
}
|
||||
|
||||
16
pkg/plugin/schemas/ondc_trv10/v2.0.1/select.json
Normal file
16
pkg/plugin/schemas/ondc_trv10/v2.0.1/select.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "select",
|
||||
"type": "object",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "../../core/v1.1.0/select.json#"
|
||||
},
|
||||
{
|
||||
"$ref": "./init.json#/allOf/1"
|
||||
},
|
||||
{
|
||||
"$ref": "./init.json#/allOf/2"
|
||||
}
|
||||
]
|
||||
}
|
||||
26
pkg/plugin/schemas/ondc_trv10/v2.0.1/status.json
Normal file
26
pkg/plugin/schemas/ondc_trv10/v2.0.1/status.json
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "status",
|
||||
"type": "object",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "../../core/v1.1.0/status.json#"
|
||||
},
|
||||
{
|
||||
"$ref": "./init.json#/allOf/1"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"order_id": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["order_id"]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
13
pkg/plugin/schemas/ondc_trv10/v2.0.1/support.json
Normal file
13
pkg/plugin/schemas/ondc_trv10/v2.0.1/support.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "support",
|
||||
"type": "object",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "../../core/v1.1.0/support.json#"
|
||||
},
|
||||
{
|
||||
"$ref": "./init.json#/allOf/1"
|
||||
}
|
||||
]
|
||||
}
|
||||
13
pkg/plugin/schemas/ondc_trv10/v2.0.1/track.json
Normal file
13
pkg/plugin/schemas/ondc_trv10/v2.0.1/track.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "track",
|
||||
"type": "object",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "../../core/v1.1.0/track.json#"
|
||||
},
|
||||
{
|
||||
"$ref": "./init.json#/allOf/1"
|
||||
}
|
||||
]
|
||||
}
|
||||
35
pkg/plugin/schemas/ondc_trv10/v2.0.1/update.json
Normal file
35
pkg/plugin/schemas/ondc_trv10/v2.0.1/update.json
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "update",
|
||||
"type": "object",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "../../core/v1.1.0/update.json#"
|
||||
},
|
||||
{
|
||||
"$ref": "./init.json#/allOf/1"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"order": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["id"]
|
||||
},
|
||||
"update_target": {
|
||||
"type": "string",
|
||||
"pattern": "^[^,]+(,[^,]+)*$"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "cancel",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "api.beckn.juspay.in/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "be6a495a-e941-4fbf-9d59-f1e6166cccc8",
|
||||
"timestamp": "2023-03-23T05:15:08Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"cancellation_reason_id": "7",
|
||||
"descriptor": {
|
||||
"code": "SOFT_CANCEL",
|
||||
"name": "Ride Cancellation"
|
||||
},
|
||||
"order_id": "O1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,155 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "confirm",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176",
|
||||
"timestamp": "2023-12-10T04:34:48.031Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"order": {
|
||||
"billing": {
|
||||
"name": "Joe Adams"
|
||||
},
|
||||
"fulfillments": [
|
||||
{
|
||||
"customer": {
|
||||
"contact": {
|
||||
"phone": "9876556789"
|
||||
},
|
||||
"person": {
|
||||
"name": "Joe Adams"
|
||||
}
|
||||
},
|
||||
"id": "F1",
|
||||
"stops": [
|
||||
{
|
||||
"location": {
|
||||
"gps": "13.008935, 77.644408"
|
||||
},
|
||||
"type": "START"
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
"gps": "12.971186, 77.586812"
|
||||
},
|
||||
"type": "END"
|
||||
}
|
||||
],
|
||||
"vehicle": {
|
||||
"category": "AUTO_RICKSHAW",
|
||||
"variant": "EV"
|
||||
}
|
||||
}
|
||||
],
|
||||
"items": [
|
||||
{
|
||||
"id": "I1"
|
||||
}
|
||||
],
|
||||
"payments": [
|
||||
{
|
||||
"collected_by": "BPP",
|
||||
"id": "PA1",
|
||||
"params": {
|
||||
"bank_account_number": "xxxxxxxxxxxxxx",
|
||||
"bank_code": "XXXXXXXX",
|
||||
"virtual_payment_address": "9988199772@okicic"
|
||||
},
|
||||
"status": "NOT-PAID",
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES_PERCENTAGE"
|
||||
},
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TERMS"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_WINDOW"
|
||||
},
|
||||
"value": "PT60M"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_BASIS"
|
||||
},
|
||||
"value": "DELIVERY"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TYPE"
|
||||
},
|
||||
"value": "UPI"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MANDATORY_ARBITRATION"
|
||||
},
|
||||
"value": "true"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "COURT_JURISDICTION"
|
||||
},
|
||||
"value": "New Delhi"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "DELAY_INTEREST"
|
||||
},
|
||||
"value": "5"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "STATIC_TERMS"
|
||||
},
|
||||
"value": "https://example-test-bap.com/static-terms.txt"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_AMOUNT"
|
||||
},
|
||||
"value": "1.46"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "ON-FULFILLMENT"
|
||||
}
|
||||
],
|
||||
"provider": {
|
||||
"id": "P1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,148 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "init",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "8926b747-0362-4fcc-b795-0994a6287700",
|
||||
"timestamp": "2023-12-09T14:09:31.307Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"order": {
|
||||
"billing": {
|
||||
"name": "Joe Adams"
|
||||
},
|
||||
"fulfillments": [
|
||||
{
|
||||
"customer": {
|
||||
"contact": {
|
||||
"phone": "9876556789"
|
||||
},
|
||||
"person": {
|
||||
"name": "Joe Adams"
|
||||
}
|
||||
},
|
||||
"id": "F1",
|
||||
"stops": [
|
||||
{
|
||||
"location": {
|
||||
"gps": "13.008935, 77.644408"
|
||||
},
|
||||
"type": "START"
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
"gps": "12.971186, 77.586812"
|
||||
},
|
||||
"type": "END"
|
||||
}
|
||||
],
|
||||
"vehicle": {
|
||||
"category": "AUTO_RICKSHAW",
|
||||
"variant": "EV"
|
||||
}
|
||||
}
|
||||
],
|
||||
"items": [
|
||||
{
|
||||
"id": "I1"
|
||||
}
|
||||
],
|
||||
"payments": [
|
||||
{
|
||||
"collected_by": "BPP",
|
||||
"params": {
|
||||
"bank_account_number": "xxxxxxxxxxxxxx",
|
||||
"bank_code": "XXXXXXXX",
|
||||
"virtual_payment_address": "9988199772@okicic"
|
||||
},
|
||||
"status": "NOT-PAID",
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES_PERCENTAGE"
|
||||
},
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TERMS"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_WINDOW"
|
||||
},
|
||||
"value": "PT60M"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_BASIS"
|
||||
},
|
||||
"value": "DELIVERY"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TYPE"
|
||||
},
|
||||
"value": "UPI"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MANDATORY_ARBITRATION"
|
||||
},
|
||||
"value": "true"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "COURT_JURISDICTION"
|
||||
},
|
||||
"value": "New Delhi"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "DELAY_INTEREST"
|
||||
},
|
||||
"value": "5"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "STATIC_TERMS"
|
||||
},
|
||||
"value": "https://example-test-bpp.com/static-terms.txt"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "ON-FULFILLMENT"
|
||||
}
|
||||
],
|
||||
"provider": {
|
||||
"id": "P1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,390 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "on_cancel",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "8926b747-0362-4fcc-b795-0994a6287700",
|
||||
"timestamp": "2023-03-23T04:48:53Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"version": "2.0.1",
|
||||
"ttl": "PT30S"
|
||||
},
|
||||
"message": {
|
||||
"order": {
|
||||
"cancellation_terms": [
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"percentage": "0"
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ASSIGNED"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
},
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"amount": {
|
||||
"currency": "INR",
|
||||
"value": "30"
|
||||
}
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ENROUTE_PICKUP"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
},
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"amount": {
|
||||
"currency": "INR",
|
||||
"value": "50"
|
||||
}
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ARRIVED_PICKUP"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
},
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"percentage": "100"
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_STARTED"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
}
|
||||
],
|
||||
"fulfillments": [
|
||||
{
|
||||
"agent": {
|
||||
"contact": {
|
||||
"phone": "9856798567"
|
||||
},
|
||||
"person": {
|
||||
"name": "Jason Roy"
|
||||
}
|
||||
},
|
||||
"customer": {
|
||||
"contact": {
|
||||
"phone": "9876556789"
|
||||
},
|
||||
"person": {
|
||||
"name": "Joe Adams"
|
||||
}
|
||||
},
|
||||
"id": "F1",
|
||||
"state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ARRIVED_PICKUP"
|
||||
}
|
||||
},
|
||||
"stops": [
|
||||
{
|
||||
"authorization": {
|
||||
"token": "234234",
|
||||
"type": "OTP"
|
||||
},
|
||||
"location": {
|
||||
"gps": "13.008935, 77.644408"
|
||||
},
|
||||
"time": {
|
||||
"duration": "PT2H"
|
||||
},
|
||||
"type": "START",
|
||||
"instructions": {
|
||||
"short_desc": "short description of the location",
|
||||
"long_desc": "long description of the location"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ROUTE_INFO",
|
||||
"name": "Route Information"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ENCODED_POLYLINE",
|
||||
"name": "Path"
|
||||
},
|
||||
"value": "_p~iF~ps|U_ulLnnqC_mqNvxq`@"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "WAYPOINTS",
|
||||
"name": "Waypoints"
|
||||
},
|
||||
"value": "[{\"gps\":\"12.909982, 77.611822\"},{\"gps\":\"12.909982,77.611822\"},{\"gps\":\"12.909982,77.611822\"},{\"gps\":\"12.909982, 77.611822\"}]"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "DELIVERY",
|
||||
"vehicle": {
|
||||
"category": "AUTO_RICKSHAW",
|
||||
"variant": "EV",
|
||||
"make": "Bajaj",
|
||||
"model": "Compact RE",
|
||||
"registration": "KA-01-AD-9876"
|
||||
}
|
||||
}
|
||||
],
|
||||
"id": "O1",
|
||||
"items": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "RIDE",
|
||||
"name": "CAB Ride"
|
||||
},
|
||||
"fulfillment_ids": [
|
||||
"F1"
|
||||
],
|
||||
"id": "I1",
|
||||
"location_ids": [
|
||||
"L1",
|
||||
"L3"
|
||||
],
|
||||
"payment_ids": [
|
||||
"PA1"
|
||||
],
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"maximum_value": "176",
|
||||
"minimum_value": "156",
|
||||
"value": "146"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "FARE_POLICY",
|
||||
"name": "Daytime Charges"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MIN_FARE"
|
||||
},
|
||||
"value": "30"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MIN_FARE_DISTANCE_KM"
|
||||
},
|
||||
"value": "2"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "PER_KM_CHARGE"
|
||||
},
|
||||
"value": "15"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "PICKUP_CHARGE"
|
||||
},
|
||||
"value": "10"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "WAITING_CHARGE_PER_MIN"
|
||||
},
|
||||
"value": "2"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_CHARGE_MULTIPLIER"
|
||||
},
|
||||
"value": "1.5"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_SHIFT_START_TIME"
|
||||
},
|
||||
"value": "22:00:00"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_SHIFT_END_TIME"
|
||||
},
|
||||
"value": "05:00:00"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "INFO",
|
||||
"name": "General Information"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "DISTANCE_TO_NEAREST_DRIVER_METER"
|
||||
},
|
||||
"value": "661"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ETA_TO_NEAREST_DRIVER_MIN"
|
||||
},
|
||||
"value": "3"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"payments": [
|
||||
{
|
||||
"collected_by": "BAP",
|
||||
"id": "PA1",
|
||||
"params": {
|
||||
"bank_account_number": "xxxxxxxxxxxxxx",
|
||||
"bank_code": "XXXXXXXX",
|
||||
"virtual_payment_address": "9988199772@okicic"
|
||||
},
|
||||
"status": "NOT-PAID",
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES_PERCENTAGE"
|
||||
},
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TERMS"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_WINDOW"
|
||||
},
|
||||
"value": "PT60M"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_BASIS"
|
||||
},
|
||||
"value": "Delivery"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TYPE"
|
||||
},
|
||||
"value": "UPI"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MANDATORY_ARBITRATION"
|
||||
},
|
||||
"value": "true"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "COURT_JURISDICTION"
|
||||
},
|
||||
"value": "New Delhi"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "DELAY_INTEREST"
|
||||
},
|
||||
"value": "2.5"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "STATIC_TERMS"
|
||||
},
|
||||
"value": "https://www.icicibank.com/personal-banking/loans/personal-loan"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_AMOUNT"
|
||||
},
|
||||
"value": "85"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "ON-FULFILLMENT"
|
||||
}
|
||||
],
|
||||
"provider": {
|
||||
"id": "P1"
|
||||
},
|
||||
"quote": {
|
||||
"breakup": [
|
||||
{
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "30"
|
||||
},
|
||||
"title": "BASE_FARE"
|
||||
},
|
||||
{
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "116"
|
||||
},
|
||||
"title": "DISTANCE_FARE"
|
||||
},
|
||||
{
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "10"
|
||||
},
|
||||
"title": "CANCELLATION_CHARGES"
|
||||
},
|
||||
{
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "-146"
|
||||
},
|
||||
"title": "REFUND"
|
||||
}
|
||||
],
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "10"
|
||||
},
|
||||
"ttl": "P200S"
|
||||
},
|
||||
"status": "SOFT_CANCEL"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,383 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "on_confirm",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "8926b747-0362-4fcc-b795-0994a6287700",
|
||||
"timestamp": "2023-12-10T08:03:34.294Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"order": {
|
||||
"cancellation_terms": [
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"percentage": "0"
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ASSIGNED"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
},
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"amount": {
|
||||
"currency": "INR",
|
||||
"value": "30"
|
||||
}
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ENROUTE_PICKUP"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
},
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"amount": {
|
||||
"currency": "INR",
|
||||
"value": "50"
|
||||
}
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ARRIVED_PICKUP"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
},
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"percentage": "100"
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_STARTED"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
}
|
||||
],
|
||||
"fulfillments": [
|
||||
{
|
||||
"agent": {
|
||||
"contact": {
|
||||
"phone": "9856798567"
|
||||
},
|
||||
"person": {
|
||||
"name": "Jason Roy"
|
||||
}
|
||||
},
|
||||
"customer": {
|
||||
"contact": {
|
||||
"phone": "9876556789"
|
||||
},
|
||||
"person": {
|
||||
"name": "Joe Adams"
|
||||
}
|
||||
},
|
||||
"id": "F1",
|
||||
"state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ASSIGNED"
|
||||
}
|
||||
},
|
||||
"stops": [
|
||||
{
|
||||
"authorization": {
|
||||
"token": "234234",
|
||||
"type": "OTP",
|
||||
"valid_to": "2023-12-10T08:05:34.294Z",
|
||||
"status": "UNCLAIMED"
|
||||
},
|
||||
"location": {
|
||||
"gps": "13.008935, 77.644408"
|
||||
},
|
||||
"type": "START",
|
||||
"instructions": {
|
||||
"short_desc": "short description of the location",
|
||||
"long_desc": "long description of the location"
|
||||
}
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
"gps": "12.971186, 77.586812"
|
||||
},
|
||||
"type": "END"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ROUTE_INFO",
|
||||
"name": "Route Information"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ENCODED_POLYLINE",
|
||||
"name": "Path"
|
||||
},
|
||||
"value": "_p~iF~ps|U_ulLnnqC_mqNvxq`@"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "WAYPOINTS",
|
||||
"name": "Waypoints"
|
||||
},
|
||||
"value": "[{\"gps\":\"12.909982, 77.611822\"},{\"gps\":\"12.909982,77.611822\"},{\"gps\":\"12.909982,77.611822\"},{\"gps\":\"12.909982, 77.611822\"}]"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "DELIVERY",
|
||||
"vehicle": {
|
||||
"category": "AUTO_RICKSHAW",
|
||||
"variant": "EV",
|
||||
"make": "Bajaj",
|
||||
"model": "Compact RE",
|
||||
"registration": "KA-01-AD-9876"
|
||||
}
|
||||
}
|
||||
],
|
||||
"id": "O1",
|
||||
"items": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "RIDE",
|
||||
"name": "Auto Ride"
|
||||
},
|
||||
"fulfillment_ids": [
|
||||
"F1"
|
||||
],
|
||||
"id": "I1",
|
||||
"location_ids": [
|
||||
"L1",
|
||||
"L3"
|
||||
],
|
||||
"payment_ids": [
|
||||
"PA1"
|
||||
],
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"maximum_value": "176",
|
||||
"minimum_value": "136",
|
||||
"value": "146"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "FARE_POLICY",
|
||||
"name": "Daytime Charges"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MIN_FARE"
|
||||
},
|
||||
"value": "30"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MIN_FARE_DISTANCE_KM"
|
||||
},
|
||||
"value": "2"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "PER_KM_CHARGE"
|
||||
},
|
||||
"value": "15"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "PICKUP_CHARGE"
|
||||
},
|
||||
"value": "10"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "WAITING_CHARGE_PER_MIN"
|
||||
},
|
||||
"value": "2"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_CHARGE_MULTIPLIER"
|
||||
},
|
||||
"value": "1.5"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_SHIFT_START_TIME"
|
||||
},
|
||||
"value": "22:00:00"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_SHIFT_END_TIME"
|
||||
},
|
||||
"value": "05:00:00"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "INFO",
|
||||
"name": "General Information"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "DISTANCE_TO_NEAREST_DRIVER_METER"
|
||||
},
|
||||
"value": "661"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ETA_TO_NEAREST_DRIVER_MIN"
|
||||
},
|
||||
"value": "3"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"payments": [
|
||||
{
|
||||
"collected_by": "BPP",
|
||||
"id": "PA1",
|
||||
"params": {
|
||||
"bank_account_number": "xxxxxxxxxxxxxx",
|
||||
"bank_code": "XXXXXXXX",
|
||||
"virtual_payment_address": "9988199772@okicic"
|
||||
},
|
||||
"status": "NOT-PAID",
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES_PERCENTAGE"
|
||||
},
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TERMS"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "DELAY_INTEREST"
|
||||
},
|
||||
"value": "5"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TYPE"
|
||||
},
|
||||
"value": "UPI"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_WINDOW"
|
||||
},
|
||||
"value": "PT2D"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_BASIS"
|
||||
},
|
||||
"value": "DELIVERY"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MANDATORY_ARBITRATION"
|
||||
},
|
||||
"value": "true"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "COURT_JURISDICTION"
|
||||
},
|
||||
"value": "New Delhi"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "STATIC_TERMS"
|
||||
},
|
||||
"value": "https://example-test-bpp.com/static-terms.txt"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_AMOUNT"
|
||||
},
|
||||
"value": "1.46"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "ON-FULFILLMENT"
|
||||
}
|
||||
],
|
||||
"provider": {
|
||||
"id": "P1"
|
||||
},
|
||||
"quote": {
|
||||
"breakup": [
|
||||
{
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "30"
|
||||
},
|
||||
"title": "BASE_FARE"
|
||||
},
|
||||
{
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "116"
|
||||
},
|
||||
"title": "DISTANCE_FARE"
|
||||
}
|
||||
],
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "146"
|
||||
},
|
||||
"ttl": "PT30S"
|
||||
},
|
||||
"status": "ACTIVE",
|
||||
"created_at": "2023-12-10T08:03:34.294Z",
|
||||
"updated_at": "2023-12-10T08:03:34.294Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "select",
|
||||
"action": "on_init",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
@@ -18,7 +18,7 @@
|
||||
"timestamp": "2023-12-09T14:11:32.859Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.0"
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"order": {
|
||||
@@ -90,7 +90,11 @@
|
||||
"location": {
|
||||
"gps": "13.008935, 77.644408"
|
||||
},
|
||||
"type": "START"
|
||||
"type": "START",
|
||||
"instructions": {
|
||||
"short_desc": "short description of the location",
|
||||
"long_desc": "long description of the location"
|
||||
}
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
@@ -126,7 +130,8 @@
|
||||
],
|
||||
"type": "DELIVERY",
|
||||
"vehicle": {
|
||||
"category": "AUTO_RICKSHAW"
|
||||
"category": "AUTO_RICKSHAW",
|
||||
"variant": "EV"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "on_rating",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "api.beckn.juspay.in/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "2a17e268-1dc4-4d1a-98a2-17554a50c7d2",
|
||||
"timestamp": "2023-03-23T05:41:15Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"feedback_ack": true,
|
||||
"rating_ack": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,221 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "on_search",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "21e54d3c-9c3b-47c1-aa3b-b0e7b20818ee",
|
||||
"timestamp": "2023-12-09T13:41:16.161Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"catalog": {
|
||||
"descriptor": {
|
||||
"name": "Mobility Servies BPP"
|
||||
},
|
||||
"providers": [
|
||||
{
|
||||
"fulfillments": [
|
||||
{
|
||||
"id": "F1",
|
||||
"stops": [
|
||||
{
|
||||
"location": {
|
||||
"gps": "13.008935, 77.644408"
|
||||
},
|
||||
"type": "START",
|
||||
"instructions": {
|
||||
"short_desc": "short description of the location",
|
||||
"long_desc": "long description of the location"
|
||||
}
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
"gps": "12.971186, 77.586812"
|
||||
},
|
||||
"type": "END"
|
||||
}
|
||||
],
|
||||
"type": "DELIVERY",
|
||||
"vehicle": {
|
||||
"category": "AUTO_RICKSHAW",
|
||||
"variant": "EV"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "F2",
|
||||
"stops": [
|
||||
{
|
||||
"location": {
|
||||
"gps": "13.008935, 77.644408"
|
||||
},
|
||||
"type": "START",
|
||||
"instructions": {
|
||||
"short_desc": "short description of the location",
|
||||
"long_desc": "long description of the location"
|
||||
}
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
"gps": "12.971186, 77.586812"
|
||||
},
|
||||
"type": "END"
|
||||
}
|
||||
],
|
||||
"type": "DELIVERY",
|
||||
"vehicle": {
|
||||
"category": "CAB",
|
||||
"variant": "SEDAN"
|
||||
}
|
||||
}
|
||||
],
|
||||
"id": "P1",
|
||||
"items": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "RIDE",
|
||||
"name": "Auto Ride"
|
||||
},
|
||||
"fulfillment_ids": [
|
||||
"F1"
|
||||
],
|
||||
"id": "I1",
|
||||
"location_ids": [
|
||||
"L1",
|
||||
"L3"
|
||||
],
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"maximum_value": "176",
|
||||
"minimum_value": "136",
|
||||
"value": "146"
|
||||
}
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "RIDE",
|
||||
"name": "CAB Economy Ride"
|
||||
},
|
||||
"fulfillment_ids": [
|
||||
"F2"
|
||||
],
|
||||
"id": "I2",
|
||||
"location_ids": [
|
||||
"L2",
|
||||
"L4"
|
||||
],
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"maximum_value": "236",
|
||||
"minimum_value": "206",
|
||||
"value": "206"
|
||||
}
|
||||
}
|
||||
],
|
||||
"locations": [
|
||||
{
|
||||
"gps": "12.916468,77.608998",
|
||||
"id": "L1"
|
||||
},
|
||||
{
|
||||
"gps": "12.916714,77.609298",
|
||||
"id": "L2"
|
||||
},
|
||||
{
|
||||
"gps": "12.916573,77.615216",
|
||||
"id": "L3"
|
||||
},
|
||||
{
|
||||
"gps": "12.906857,77.604456",
|
||||
"id": "L4"
|
||||
}
|
||||
],
|
||||
"payments": [
|
||||
{
|
||||
"collected_by": "BPP",
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES_PERCENTAGE"
|
||||
},
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TERMS"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_WINDOW"
|
||||
},
|
||||
"value": "PT60M"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_BASIS"
|
||||
},
|
||||
"value": "DELIVERY"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TYPE"
|
||||
},
|
||||
"value": "UPI"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MANDATORY_ARBITRATION"
|
||||
},
|
||||
"value": "true"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "COURT_JURISDICTION"
|
||||
},
|
||||
"value": "New Delhi"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "DELAY_INTEREST"
|
||||
},
|
||||
"value": "5"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "STATIC_TERMS"
|
||||
},
|
||||
"value": "https://example-test-bpp.com/static-terms.txt"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,209 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "on_select",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "8926b747-0362-4fcc-b795-0994a6287700",
|
||||
"timestamp": "2023-12-09T13:49:26.132Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"order": {
|
||||
"fulfillments": [
|
||||
{
|
||||
"id": "F1",
|
||||
"stops": [
|
||||
{
|
||||
"location": {
|
||||
"gps": "13.008935, 77.644408"
|
||||
},
|
||||
"type": "START",
|
||||
"instructions": {
|
||||
"short_desc": "short description of the location",
|
||||
"long_desc": "long description of the location"
|
||||
}
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
"gps": "12.971186, 77.586812"
|
||||
},
|
||||
"type": "END"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ROUTE_INFO",
|
||||
"name": "Route Information"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ENCODED_POLYLINE",
|
||||
"name": "Path"
|
||||
},
|
||||
"value": "_p~iF~ps|U_ulLnnqC_mqNvxq`@"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "WAYPOINTS",
|
||||
"name": "Waypoints"
|
||||
},
|
||||
"value": "[{\"gps\":\"12.909982, 77.611822\"},{\"gps\":\"12.909982,77.611822\"},{\"gps\":\"12.909982,77.611822\"},{\"gps\":\"12.909982, 77.611822\"}]"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "DELIVERY",
|
||||
"vehicle": {
|
||||
"category": "AUTO_RICKSHAW",
|
||||
"variant": "EV"
|
||||
}
|
||||
}
|
||||
],
|
||||
"items": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "RIDE",
|
||||
"name": "Auto Ride"
|
||||
},
|
||||
"fulfillment_ids": [
|
||||
"F1"
|
||||
],
|
||||
"id": "I1",
|
||||
"location_ids": [
|
||||
"L1",
|
||||
"L3"
|
||||
],
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"maximum_value": "176",
|
||||
"minimum_value": "136",
|
||||
"value": "146"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "FARE_POLICY",
|
||||
"name": "Daytime Charges"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MIN_FARE"
|
||||
},
|
||||
"value": "30"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MIN_FARE_DISTANCE_KM"
|
||||
},
|
||||
"value": "2"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "PER_KM_CHARGE"
|
||||
},
|
||||
"value": "15"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "PICKUP_CHARGE"
|
||||
},
|
||||
"value": "10"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "WAITING_CHARGE_PER_MIN"
|
||||
},
|
||||
"value": "2"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_CHARGE_MULTIPLIER"
|
||||
},
|
||||
"value": "1.5"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_SHIFT_START_TIME"
|
||||
},
|
||||
"value": "22:00:00"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_SHIFT_END_TIME"
|
||||
},
|
||||
"value": "05:00:00"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "INFO",
|
||||
"name": "General Information"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "DISTANCE_TO_NEAREST_DRIVER_METER"
|
||||
},
|
||||
"value": "661"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ETA_TO_NEAREST_DRIVER_MIN"
|
||||
},
|
||||
"value": "3"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"provider": {
|
||||
"id": "P1"
|
||||
},
|
||||
"quote": {
|
||||
"breakup": [
|
||||
{
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "30"
|
||||
},
|
||||
"title": "BASE_FARE"
|
||||
},
|
||||
{
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "116"
|
||||
},
|
||||
"title": "DISTANCE_FARE"
|
||||
}
|
||||
],
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "146"
|
||||
},
|
||||
"ttl": "P200s"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,383 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "on_status",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "5ee2001f-e612-431d-9e07-49574af60e88",
|
||||
"timestamp": "2023-03-23T04:49:34.53Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"order": {
|
||||
"cancellation_terms": [
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"percentage": "0"
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ASSIGNED"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
},
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"amount": {
|
||||
"currency": "INR",
|
||||
"value": "30"
|
||||
}
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ENROUTE_PICKUP"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
},
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"amount": {
|
||||
"currency": "INR",
|
||||
"value": "50"
|
||||
}
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ARRIVED_PICKUP"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
},
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"percentage": "100"
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_STARTED"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
}
|
||||
],
|
||||
"fulfillments": [
|
||||
{
|
||||
"agent": {
|
||||
"contact": {
|
||||
"phone": "9856798567"
|
||||
},
|
||||
"person": {
|
||||
"name": "Jason Roy"
|
||||
}
|
||||
},
|
||||
"customer": {
|
||||
"contact": {
|
||||
"phone": "9876556789"
|
||||
},
|
||||
"person": {
|
||||
"name": "Joe Adams"
|
||||
}
|
||||
},
|
||||
"id": "F1",
|
||||
"state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ENROUTE_PICKUP"
|
||||
}
|
||||
},
|
||||
"stops": [
|
||||
{
|
||||
"authorization": {
|
||||
"token": "234234",
|
||||
"type": "OTP",
|
||||
"valid_to": "2023-12-10T08:05:34.294Z",
|
||||
"status": "UNCLAIMED"
|
||||
},
|
||||
"location": {
|
||||
"gps": "13.008935, 77.644408"
|
||||
},
|
||||
"instructions": {
|
||||
"short_desc": "short description of the location",
|
||||
"long_desc": "long description of the location"
|
||||
},
|
||||
"type": "START"
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
"gps": "12.971186, 77.586812"
|
||||
},
|
||||
"type": "END"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ROUTE_INFO",
|
||||
"name": "Route Information"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ENCODED_POLYLINE",
|
||||
"name": "Path"
|
||||
},
|
||||
"value": "_p~iF~ps|U_ulLnnqC_mqNvxq`@"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "WAYPOINTS",
|
||||
"name": "Waypoints"
|
||||
},
|
||||
"value": "[{\"gps\":\"12.909982, 77.611822\"},{\"gps\":\"12.909982,77.611822\"},{\"gps\":\"12.909982,77.611822\"},{\"gps\":\"12.909982, 77.611822\"}]"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "DELIVERY",
|
||||
"vehicle": {
|
||||
"category": "AUTO_RICKSHAW",
|
||||
"variant": "EV",
|
||||
"make": "Bajaj",
|
||||
"model": "Compact RE",
|
||||
"registration": "KA-01-AD-9876"
|
||||
}
|
||||
}
|
||||
],
|
||||
"id": "O1",
|
||||
"items": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "RIDE",
|
||||
"name": "Auto Ride"
|
||||
},
|
||||
"fulfillment_ids": [
|
||||
"F1"
|
||||
],
|
||||
"id": "I1",
|
||||
"location_ids": [
|
||||
"L1",
|
||||
"L3"
|
||||
],
|
||||
"payment_ids": [
|
||||
"PA1"
|
||||
],
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"maximum_value": "176",
|
||||
"minimum_value": "136",
|
||||
"value": "146"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "FARE_POLICY",
|
||||
"name": "Daytime Charges"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MIN_FARE"
|
||||
},
|
||||
"value": "30"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MIN_FARE_DISTANCE_KM"
|
||||
},
|
||||
"value": "2"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "PER_KM_CHARGE"
|
||||
},
|
||||
"value": "15"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "PICKUP_CHARGE"
|
||||
},
|
||||
"value": "10"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "WAITING_CHARGE_PER_MIN"
|
||||
},
|
||||
"value": "2"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_CHARGE_MULTIPLIER"
|
||||
},
|
||||
"value": "1.5"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_SHIFT_START_TIME"
|
||||
},
|
||||
"value": "22:00:00"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_SHIFT_END_TIME"
|
||||
},
|
||||
"value": "05:00:00"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "INFO",
|
||||
"name": "General Information"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "DISTANCE_TO_NEAREST_DRIVER_METER"
|
||||
},
|
||||
"value": "661"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ETA_TO_NEAREST_DRIVER_MIN"
|
||||
},
|
||||
"value": "3"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"payments": [
|
||||
{
|
||||
"collected_by": "BPP",
|
||||
"id": "PA1",
|
||||
"params": {
|
||||
"bank_account_number": "xxxxxxxxxxxxxx",
|
||||
"bank_code": "XXXXXXXX",
|
||||
"virtual_payment_address": "9988199772@okicic"
|
||||
},
|
||||
"status": "NOT-PAID",
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES_PERCENTAGE"
|
||||
},
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TERMS"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "DELAY_INTEREST"
|
||||
},
|
||||
"value": "5"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TYPE"
|
||||
},
|
||||
"value": "UPI"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_WINDOW"
|
||||
},
|
||||
"value": "PT2D"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_BASIS"
|
||||
},
|
||||
"value": "DELIVERY"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MANDATORY_ARBITRATION"
|
||||
},
|
||||
"value": "true"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "COURT_JURISDICTION"
|
||||
},
|
||||
"value": "New Delhi"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "STATIC_TERMS"
|
||||
},
|
||||
"value": "https://example-test-bpp.com/static-terms.txt"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_AMOUNT"
|
||||
},
|
||||
"value": "1.46"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "ON-FULFILLMENT"
|
||||
}
|
||||
],
|
||||
"provider": {
|
||||
"id": "P1"
|
||||
},
|
||||
"quote": {
|
||||
"breakup": [
|
||||
{
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "30"
|
||||
},
|
||||
"title": "BASE_FARE"
|
||||
},
|
||||
{
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "116"
|
||||
},
|
||||
"title": "DISTANCE_FARE"
|
||||
}
|
||||
],
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "146"
|
||||
},
|
||||
"ttl": "PT30S"
|
||||
},
|
||||
"status": "ACTIVE",
|
||||
"created_at": "2023-03-23T04:48:34.53Z",
|
||||
"updated_at": "2023-03-23T04:49:34.53Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "on_support",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "ec3dea8c-c64c-4f06-b2a0-ec1f9584d7ba",
|
||||
"timestamp": "2023-03-23T05:41:09Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"support": {
|
||||
"email": "support@nammayatri.in",
|
||||
"phone": "+918068870525",
|
||||
"url": "https://support.nammayatri.com/gethelp"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "on_track",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "ec3dea8c-c64c-4f06-b2a0-ec1f9584d7ba",
|
||||
"timestamp": "2023-03-23T05:41:09Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"tracking": {
|
||||
"status": "active",
|
||||
"location": {
|
||||
"gps": "28.620976, 77.046732",
|
||||
"updated_at": "2023-03-23T05:41:09Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,383 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "on_update",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "8926b747-0362-4fcc-b795-0994a6287700",
|
||||
"timestamp": "2023-12-10T08:03:34.294Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"order": {
|
||||
"cancellation_terms": [
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"percentage": "0"
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ASSIGNED"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
},
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"amount": {
|
||||
"currency": "INR",
|
||||
"value": "30"
|
||||
}
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ENROUTE_PICKUP"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
},
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"amount": {
|
||||
"currency": "INR",
|
||||
"value": "50"
|
||||
}
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ARRIVED_PICKUP"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
},
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"percentage": "100"
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_STARTED"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
}
|
||||
],
|
||||
"fulfillments": [
|
||||
{
|
||||
"id": "F1",
|
||||
"state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ASSIGNED"
|
||||
}
|
||||
},
|
||||
"stops": [
|
||||
{
|
||||
"authorization": {
|
||||
"token": "234234",
|
||||
"type": "OTP",
|
||||
"valid_to": "2023-12-10T08:05:34.294Z",
|
||||
"status": "UNCLAIMED"
|
||||
},
|
||||
"location": {
|
||||
"gps": "13.008935, 77.644408"
|
||||
},
|
||||
"type": "START",
|
||||
"instructions": {
|
||||
"short_desc": "short description of the location",
|
||||
"long_desc": "long description of the location"
|
||||
}
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
"gps": "12.971186, 77.586812"
|
||||
},
|
||||
"type": "END"
|
||||
}
|
||||
],
|
||||
"agent": {
|
||||
"contact": {
|
||||
"phone": "9856798567"
|
||||
},
|
||||
"person": {
|
||||
"name": "Jason Roy"
|
||||
}
|
||||
},
|
||||
"customer": {
|
||||
"contact": {
|
||||
"phone": "9876556789"
|
||||
},
|
||||
"person": {
|
||||
"name": "Joe Adams"
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ROUTE_INFO",
|
||||
"name": "Route Information"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ENCODED_POLYLINE",
|
||||
"name": "Path"
|
||||
},
|
||||
"value": "_p~iF~ps|U_ulLnnqC_mqNvxq`@"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "WAYPOINTS",
|
||||
"name": "Waypoints"
|
||||
},
|
||||
"value": "[{\"gps\":\"12.909982, 77.611822\"},{\"gps\":\"12.909982,77.611822\"},{\"gps\":\"12.909982,77.611822\"},{\"gps\":\"12.909982, 77.611822\"}]"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "SELF_PICKUP",
|
||||
"vehicle": {
|
||||
"category": "AUTO_RICKSHAW",
|
||||
"variant": "EV",
|
||||
"make": "Bajaj",
|
||||
"model": "Compact RE",
|
||||
"registration": "KA-01-AD-9876"
|
||||
}
|
||||
}
|
||||
],
|
||||
"id": "O1",
|
||||
"items": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "RIDE",
|
||||
"name": "Auto Ride"
|
||||
},
|
||||
"fulfillment_ids": [
|
||||
"F1"
|
||||
],
|
||||
"id": "I1",
|
||||
"location_ids": [
|
||||
"L1",
|
||||
"L3"
|
||||
],
|
||||
"payment_ids": [
|
||||
"PA1"
|
||||
],
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"maximum_value": "176",
|
||||
"minimum_value": "136",
|
||||
"value": "146"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "FARE_POLICY",
|
||||
"name": "Daytime Charges"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MIN_FARE"
|
||||
},
|
||||
"value": "30"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MIN_FARE_DISTANCE_KM"
|
||||
},
|
||||
"value": "2"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "PER_KM_CHARGE"
|
||||
},
|
||||
"value": "15"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "PICKUP_CHARGE"
|
||||
},
|
||||
"value": "10"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "WAITING_CHARGE_PER_MIN"
|
||||
},
|
||||
"value": "2"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_CHARGE_MULTIPLIER"
|
||||
},
|
||||
"value": "1.5"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_SHIFT_START_TIME"
|
||||
},
|
||||
"value": "22:00:00"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_SHIFT_END_TIME"
|
||||
},
|
||||
"value": "05:00:00"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "INFO",
|
||||
"name": "General Information"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "DISTANCE_TO_NEAREST_DRIVER_METER"
|
||||
},
|
||||
"value": "661"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ETA_TO_NEAREST_DRIVER_MIN"
|
||||
},
|
||||
"value": "3"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"payments": [
|
||||
{
|
||||
"collected_by": "BPP",
|
||||
"id": "PA1",
|
||||
"params": {
|
||||
"bank_account_number": "xxxxxxxxxxxxxx",
|
||||
"bank_code": "XXXXXXXX",
|
||||
"virtual_payment_address": "9988199772@okicic"
|
||||
},
|
||||
"status": "NOT-PAID",
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES_PERCENTAGE"
|
||||
},
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TERMS"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "DELAY_INTEREST"
|
||||
},
|
||||
"value": "5"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TYPE"
|
||||
},
|
||||
"value": "UPI"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_WINDOW"
|
||||
},
|
||||
"value": "PT2D"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_BASIS"
|
||||
},
|
||||
"value": "DELIVERY"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MANDATORY_ARBITRATION"
|
||||
},
|
||||
"value": "true"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "COURT_JURISDICTION"
|
||||
},
|
||||
"value": "New Delhi"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "STATIC_TERMS"
|
||||
},
|
||||
"value": "https://example-test-bpp.com/static-terms.txt"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_AMOUNT"
|
||||
},
|
||||
"value": "1.46"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "ON-FULFILLMENT"
|
||||
}
|
||||
],
|
||||
"provider": {
|
||||
"id": "P1"
|
||||
},
|
||||
"quote": {
|
||||
"breakup": [
|
||||
{
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "30"
|
||||
},
|
||||
"title": "BASE_FARE"
|
||||
},
|
||||
{
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "116"
|
||||
},
|
||||
"title": "DISTANCE_FARE"
|
||||
}
|
||||
],
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "146"
|
||||
},
|
||||
"ttl": "PT30S"
|
||||
},
|
||||
"status": "ACTIVE",
|
||||
"created_at": "2023-12-10T08:03:34.294Z",
|
||||
"updated_at": "2023-12-10T08:03:34.294Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "rating",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "b462a835-97d6-4479-bec8-9660a0f8513e",
|
||||
"timestamp": "2023-03-23T04:46:45Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"id": "b0462745-f6c9-4100-bbe7-4fa3648b6b40",
|
||||
"rating_category": "DRIVER",
|
||||
"value": 4
|
||||
}
|
||||
}
|
||||
@@ -16,10 +16,26 @@
|
||||
"timestamp": "2023-12-09T13:39:56.645Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.0"
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"intent": {
|
||||
"fulfillment": {
|
||||
"stops": [
|
||||
{
|
||||
"location": {
|
||||
"gps": "13.008935, 77.644408"
|
||||
},
|
||||
"type": "START"
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
"gps": "12.971186, 77.586812"
|
||||
},
|
||||
"type": "END"
|
||||
}
|
||||
]
|
||||
},
|
||||
"payment": {
|
||||
"collected_by": "BPP",
|
||||
"tags": [
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "select",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "432fdfd6-0457-47b6-9fac-80cbe5c0a75b",
|
||||
"timestamp": "2023-12-09T13:49:01.460Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "P120S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"order": {
|
||||
"items": [
|
||||
{
|
||||
"id": "I1"
|
||||
}
|
||||
],
|
||||
"provider": {
|
||||
"id": "P1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "status",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "8926b747-0362-4fcc-b795-0994a6287700",
|
||||
"timestamp": "2023-03-23T04:48:53Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "support",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "8926b747-0362-4fcc-b795-0994a6287700",
|
||||
"timestamp": "2023-03-23T04:48:53Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"ref_id": "7751bd26-3fdc-47ca-9b64-e998dc5abe68"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "track",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "8926b747-0362-4fcc-b795-0994a6287700",
|
||||
"timestamp": "2023-03-23T04:48:53Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"order_id": "O1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "update",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/trv10",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176",
|
||||
"timestamp": "2023-03-23T04:41:16Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"update_target": "order",
|
||||
"order": {
|
||||
"billing": {
|
||||
"email": "jane.doe@example.com",
|
||||
"name": "Jane Doe",
|
||||
"phone": "+91-9897867564"
|
||||
},
|
||||
"id": "O1",
|
||||
"provider": {
|
||||
"id": "P1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "cancel",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "api.beckn.juspay.in/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "be6a495a-e941-4fbf-9d59-f1e6166cccc8",
|
||||
"timestamp": "2023-03-23T05:15:08Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"cancellation_reason_id": "7",
|
||||
"descriptor": {
|
||||
"code": "SOFT_CANCEL",
|
||||
"name": "Ride Cancellation"
|
||||
},
|
||||
"order_id": "O1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,155 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "confirm",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176",
|
||||
"timestamp": "2023-12-10T04:34:48.031Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"order": {
|
||||
"billing": {
|
||||
"name": "Joe Adams"
|
||||
},
|
||||
"fulfillments": [
|
||||
{
|
||||
"customer": {
|
||||
"contact": {
|
||||
"phone": "9876556789"
|
||||
},
|
||||
"person": {
|
||||
"name": "Joe Adams"
|
||||
}
|
||||
},
|
||||
"id": "F1",
|
||||
"stops": [
|
||||
{
|
||||
"location": {
|
||||
"gps": "13.008935, 77.644408"
|
||||
},
|
||||
"type": "START"
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
"gps": "12.971186, 77.586812"
|
||||
},
|
||||
"type": "END"
|
||||
}
|
||||
],
|
||||
"vehicle": {
|
||||
"category": "AUTO_RICKSHAW",
|
||||
"variant": "EV"
|
||||
}
|
||||
}
|
||||
],
|
||||
"items": [
|
||||
{
|
||||
"id": "I1"
|
||||
}
|
||||
],
|
||||
"payments": [
|
||||
{
|
||||
"collected_by": "BPP",
|
||||
"id": "PA1",
|
||||
"params": {
|
||||
"bank_account_number": "xxxxxxxxxxxxxx",
|
||||
"bank_code": "XXXXXXXX",
|
||||
"virtual_payment_address": "9988199772@okicic"
|
||||
},
|
||||
"status": "NOT-PAID",
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES_PERCENTAGE"
|
||||
},
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TERMS"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_WINDOW"
|
||||
},
|
||||
"value": "PT60M"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_BASIS"
|
||||
},
|
||||
"value": "DELIVERY"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TYPE"
|
||||
},
|
||||
"value": "UPI"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MANDATORY_ARBITRATION"
|
||||
},
|
||||
"value": "true"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "COURT_JURISDICTION"
|
||||
},
|
||||
"value": "New Delhi"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "DELAY_INTEREST"
|
||||
},
|
||||
"value": "5"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "STATIC_TERMS"
|
||||
},
|
||||
"value": "https://example-test-bap.com/static-terms.txt"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_AMOUNT"
|
||||
},
|
||||
"value": "1.46"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "ON-FULFILLMENT"
|
||||
}
|
||||
],
|
||||
"provider": {
|
||||
"id": "P1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "init",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "8926b747-0362-4fcc-b795-0994a6287700",
|
||||
"timestamp": "2023-12-09T14:09:31.307Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"order": {
|
||||
"billing": {
|
||||
"name": "Joe Adams"
|
||||
},
|
||||
"fulfillments": [
|
||||
{
|
||||
"customer": {
|
||||
"contact": {
|
||||
"phone": "9876556789"
|
||||
},
|
||||
"person": {
|
||||
"name": "Joe Adams"
|
||||
}
|
||||
},
|
||||
"id": "F1",
|
||||
"stops": [
|
||||
{
|
||||
"location": {
|
||||
"gps": "13.008935, 77.644408"
|
||||
},
|
||||
"type": "START"
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
"gps": "12.971186, 77.586812"
|
||||
},
|
||||
"type": "END"
|
||||
}
|
||||
],
|
||||
"vehicle": {
|
||||
"category": "AUTO_RICKSHAW",
|
||||
"variant": "AUTO_RICKSHAW",
|
||||
"energy_type": "CNG"
|
||||
}
|
||||
}
|
||||
],
|
||||
"items": [
|
||||
{
|
||||
"id": "I1"
|
||||
}
|
||||
],
|
||||
"payments": [
|
||||
{
|
||||
"collected_by": "BPP",
|
||||
"params": {
|
||||
"bank_account_number": "xxxxxxxxxxxxxx",
|
||||
"bank_code": "XXXXXXXX",
|
||||
"virtual_payment_address": "9988199772@okicic"
|
||||
},
|
||||
"status": "NOT-PAID",
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES_PERCENTAGE"
|
||||
},
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TERMS"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_WINDOW"
|
||||
},
|
||||
"value": "PT60M"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_BASIS"
|
||||
},
|
||||
"value": "DELIVERY"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TYPE"
|
||||
},
|
||||
"value": "UPI"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MANDATORY_ARBITRATION"
|
||||
},
|
||||
"value": "true"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "COURT_JURISDICTION"
|
||||
},
|
||||
"value": "New Delhi"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "DELAY_INTEREST"
|
||||
},
|
||||
"value": "5"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "STATIC_TERMS"
|
||||
},
|
||||
"value": "https://example-test-bpp.com/static-terms.txt"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_AMOUNT"
|
||||
},
|
||||
"value": "144.54"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "ON-FULFILLMENT"
|
||||
}
|
||||
],
|
||||
"provider": {
|
||||
"id": "P1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,390 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "on_cancel",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "8926b747-0362-4fcc-b795-0994a6287700",
|
||||
"timestamp": "2023-03-23T04:48:53Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"version": "2.0.1",
|
||||
"ttl": "PT30S"
|
||||
},
|
||||
"message": {
|
||||
"order": {
|
||||
"cancellation_terms": [
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"percentage": "0"
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ASSIGNED"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
},
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"amount": {
|
||||
"currency": "INR",
|
||||
"value": "30"
|
||||
}
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ENROUTE_PICKUP"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
},
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"amount": {
|
||||
"currency": "INR",
|
||||
"value": "50"
|
||||
}
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ARRIVED_PICKUP"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
},
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"percentage": "100"
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_STARTED"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
}
|
||||
],
|
||||
"fulfillments": [
|
||||
{
|
||||
"agent": {
|
||||
"contact": {
|
||||
"phone": "9856798567"
|
||||
},
|
||||
"person": {
|
||||
"name": "Jason Roy"
|
||||
}
|
||||
},
|
||||
"customer": {
|
||||
"contact": {
|
||||
"phone": "9876556789"
|
||||
},
|
||||
"person": {
|
||||
"name": "Joe Adams"
|
||||
}
|
||||
},
|
||||
"id": "F1",
|
||||
"state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ARRIVED_PICKUP"
|
||||
}
|
||||
},
|
||||
"stops": [
|
||||
{
|
||||
"authorization": {
|
||||
"token": "234234",
|
||||
"type": "OTP"
|
||||
},
|
||||
"location": {
|
||||
"gps": "13.008935, 77.644408"
|
||||
},
|
||||
"time": {
|
||||
"duration": "PT2H"
|
||||
},
|
||||
"type": "START",
|
||||
"instructions": {
|
||||
"short_desc": "short description of the location",
|
||||
"long_desc": "long description of the location"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ROUTE_INFO",
|
||||
"name": "Route Information"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ENCODED_POLYLINE",
|
||||
"name": "Path"
|
||||
},
|
||||
"value": "_p~iF~ps|U_ulLnnqC_mqNvxq`@"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "WAYPOINTS",
|
||||
"name": "Waypoints"
|
||||
},
|
||||
"value": "[{\"gps\":\"12.909982, 77.611822\"},{\"gps\":\"12.909982,77.611822\"},{\"gps\":\"12.909982,77.611822\"},{\"gps\":\"12.909982, 77.611822\"}]"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "DELIVERY",
|
||||
"vehicle": {
|
||||
"category": "AUTO_RICKSHAW",
|
||||
"variant": "EV",
|
||||
"make": "Bajaj",
|
||||
"model": "Compact RE",
|
||||
"registration": "KA-01-AD-9876"
|
||||
}
|
||||
}
|
||||
],
|
||||
"id": "O1",
|
||||
"items": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "RIDE",
|
||||
"name": "CAB Ride"
|
||||
},
|
||||
"fulfillment_ids": [
|
||||
"F1"
|
||||
],
|
||||
"id": "I1",
|
||||
"location_ids": [
|
||||
"L1",
|
||||
"L3"
|
||||
],
|
||||
"payment_ids": [
|
||||
"PA1"
|
||||
],
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"maximum_value": "176",
|
||||
"minimum_value": "156",
|
||||
"value": "146"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "FARE_POLICY",
|
||||
"name": "Daytime Charges"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MIN_FARE"
|
||||
},
|
||||
"value": "30"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MIN_FARE_DISTANCE_KM"
|
||||
},
|
||||
"value": "2"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "PER_KM_CHARGE"
|
||||
},
|
||||
"value": "15"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "PICKUP_CHARGE"
|
||||
},
|
||||
"value": "10"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "WAITING_CHARGE_PER_MIN"
|
||||
},
|
||||
"value": "2"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_CHARGE_MULTIPLIER"
|
||||
},
|
||||
"value": "1.5"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_SHIFT_START_TIME"
|
||||
},
|
||||
"value": "22:00:00"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_SHIFT_END_TIME"
|
||||
},
|
||||
"value": "05:00:00"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "INFO",
|
||||
"name": "General Information"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "DISTANCE_TO_NEAREST_DRIVER_METER"
|
||||
},
|
||||
"value": "661"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ETA_TO_NEAREST_DRIVER_MIN"
|
||||
},
|
||||
"value": "3"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"payments": [
|
||||
{
|
||||
"collected_by": "BAP",
|
||||
"id": "PA1",
|
||||
"params": {
|
||||
"bank_account_number": "xxxxxxxxxxxxxx",
|
||||
"bank_code": "XXXXXXXX",
|
||||
"virtual_payment_address": "9988199772@okicic"
|
||||
},
|
||||
"status": "NOT-PAID",
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES_PERCENTAGE"
|
||||
},
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TERMS"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_WINDOW"
|
||||
},
|
||||
"value": "PT60M"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_BASIS"
|
||||
},
|
||||
"value": "Delivery"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TYPE"
|
||||
},
|
||||
"value": "UPI"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MANDATORY_ARBITRATION"
|
||||
},
|
||||
"value": "true"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "COURT_JURISDICTION"
|
||||
},
|
||||
"value": "New Delhi"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "DELAY_INTEREST"
|
||||
},
|
||||
"value": "2.5"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "STATIC_TERMS"
|
||||
},
|
||||
"value": "https://www.icicibank.com/personal-banking/loans/personal-loan"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_AMOUNT"
|
||||
},
|
||||
"value": "85"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "ON-FULFILLMENT"
|
||||
}
|
||||
],
|
||||
"provider": {
|
||||
"id": "P1"
|
||||
},
|
||||
"quote": {
|
||||
"breakup": [
|
||||
{
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "30"
|
||||
},
|
||||
"title": "BASE_FARE"
|
||||
},
|
||||
{
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "116"
|
||||
},
|
||||
"title": "DISTANCE_FARE"
|
||||
},
|
||||
{
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "10"
|
||||
},
|
||||
"title": "CANCELLATION_CHARGES"
|
||||
},
|
||||
{
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "-146"
|
||||
},
|
||||
"title": "REFUND"
|
||||
}
|
||||
],
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "10"
|
||||
},
|
||||
"ttl": "P200S"
|
||||
},
|
||||
"status": "SOFT_CANCEL"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,383 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "on_confirm",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "8926b747-0362-4fcc-b795-0994a6287700",
|
||||
"timestamp": "2023-12-10T08:03:34.294Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"order": {
|
||||
"cancellation_terms": [
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"percentage": "0"
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ASSIGNED"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
},
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"amount": {
|
||||
"currency": "INR",
|
||||
"value": "30"
|
||||
}
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ENROUTE_PICKUP"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
},
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"amount": {
|
||||
"currency": "INR",
|
||||
"value": "50"
|
||||
}
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ARRIVED_PICKUP"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
},
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"percentage": "100"
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_STARTED"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
}
|
||||
],
|
||||
"fulfillments": [
|
||||
{
|
||||
"agent": {
|
||||
"contact": {
|
||||
"phone": "9856798567"
|
||||
},
|
||||
"person": {
|
||||
"name": "Jason Roy"
|
||||
}
|
||||
},
|
||||
"customer": {
|
||||
"contact": {
|
||||
"phone": "9876556789"
|
||||
},
|
||||
"person": {
|
||||
"name": "Joe Adams"
|
||||
}
|
||||
},
|
||||
"id": "F1",
|
||||
"state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ASSIGNED"
|
||||
}
|
||||
},
|
||||
"stops": [
|
||||
{
|
||||
"authorization": {
|
||||
"token": "234234",
|
||||
"type": "OTP",
|
||||
"valid_to": "2023-12-10T08:05:34.294Z",
|
||||
"status": "UNCLAIMED"
|
||||
},
|
||||
"location": {
|
||||
"gps": "13.008935, 77.644408"
|
||||
},
|
||||
"type": "START",
|
||||
"instructions": {
|
||||
"short_desc": "short description of the location",
|
||||
"long_desc": "long description of the location"
|
||||
}
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
"gps": "12.971186, 77.586812"
|
||||
},
|
||||
"type": "END"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ROUTE_INFO",
|
||||
"name": "Route Information"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ENCODED_POLYLINE",
|
||||
"name": "Path"
|
||||
},
|
||||
"value": "_p~iF~ps|U_ulLnnqC_mqNvxq`@"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "WAYPOINTS",
|
||||
"name": "Waypoints"
|
||||
},
|
||||
"value": "[{\"gps\":\"12.909982, 77.611822\"},{\"gps\":\"12.909982,77.611822\"},{\"gps\":\"12.909982,77.611822\"},{\"gps\":\"12.909982, 77.611822\"}]"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "DELIVERY",
|
||||
"vehicle": {
|
||||
"category": "AUTO_RICKSHAW",
|
||||
"variant": "EV",
|
||||
"make": "Bajaj",
|
||||
"model": "Compact RE",
|
||||
"registration": "KA-01-AD-9876"
|
||||
}
|
||||
}
|
||||
],
|
||||
"id": "O1",
|
||||
"items": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "RIDE",
|
||||
"name": "Auto Ride"
|
||||
},
|
||||
"fulfillment_ids": [
|
||||
"F1"
|
||||
],
|
||||
"id": "I1",
|
||||
"location_ids": [
|
||||
"L1",
|
||||
"L3"
|
||||
],
|
||||
"payment_ids": [
|
||||
"PA1"
|
||||
],
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"maximum_value": "176",
|
||||
"minimum_value": "136",
|
||||
"value": "146"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "FARE_POLICY",
|
||||
"name": "Daytime Charges"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MIN_FARE"
|
||||
},
|
||||
"value": "30"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MIN_FARE_DISTANCE_KM"
|
||||
},
|
||||
"value": "2"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "PER_KM_CHARGE"
|
||||
},
|
||||
"value": "15"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "PICKUP_CHARGE"
|
||||
},
|
||||
"value": "10"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "WAITING_CHARGE_PER_MIN"
|
||||
},
|
||||
"value": "2"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_CHARGE_MULTIPLIER"
|
||||
},
|
||||
"value": "1.5"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_SHIFT_START_TIME"
|
||||
},
|
||||
"value": "22:00:00"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_SHIFT_END_TIME"
|
||||
},
|
||||
"value": "05:00:00"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "INFO",
|
||||
"name": "General Information"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "DISTANCE_TO_NEAREST_DRIVER_METER"
|
||||
},
|
||||
"value": "661"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ETA_TO_NEAREST_DRIVER_MIN"
|
||||
},
|
||||
"value": "3"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"payments": [
|
||||
{
|
||||
"collected_by": "BPP",
|
||||
"id": "PA1",
|
||||
"params": {
|
||||
"bank_account_number": "xxxxxxxxxxxxxx",
|
||||
"bank_code": "XXXXXXXX",
|
||||
"virtual_payment_address": "9988199772@okicic"
|
||||
},
|
||||
"status": "NOT-PAID",
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES_PERCENTAGE"
|
||||
},
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TERMS"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "DELAY_INTEREST"
|
||||
},
|
||||
"value": "5"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TYPE"
|
||||
},
|
||||
"value": "UPI"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_WINDOW"
|
||||
},
|
||||
"value": "PT2D"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_BASIS"
|
||||
},
|
||||
"value": "DELIVERY"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MANDATORY_ARBITRATION"
|
||||
},
|
||||
"value": "true"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "COURT_JURISDICTION"
|
||||
},
|
||||
"value": "New Delhi"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "STATIC_TERMS"
|
||||
},
|
||||
"value": "https://example-test-bpp.com/static-terms.txt"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_AMOUNT"
|
||||
},
|
||||
"value": "1.46"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "ON-FULFILLMENT"
|
||||
}
|
||||
],
|
||||
"provider": {
|
||||
"id": "P1"
|
||||
},
|
||||
"quote": {
|
||||
"breakup": [
|
||||
{
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "30"
|
||||
},
|
||||
"title": "BASE_FARE"
|
||||
},
|
||||
{
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "116"
|
||||
},
|
||||
"title": "DISTANCE_FARE"
|
||||
}
|
||||
],
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "146"
|
||||
},
|
||||
"ttl": "PT30S"
|
||||
},
|
||||
"status": "ACTIVE",
|
||||
"created_at": "2023-12-10T08:03:34.294Z",
|
||||
"updated_at": "2023-12-10T08:03:34.294Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,356 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "on_init",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "8926b747-0362-4fcc-b795-0994a6287700",
|
||||
"timestamp": "2023-12-09T14:11:32.859Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"order": {
|
||||
"cancellation_terms": [
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"percentage": "0"
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ASSIGNED"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
},
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"amount": {
|
||||
"currency": "INR",
|
||||
"value": "30"
|
||||
}
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ENROUTE_PICKUP"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
},
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"amount": {
|
||||
"currency": "INR",
|
||||
"value": "50"
|
||||
}
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ARRIVED_PICKUP"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
},
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"percentage": "100"
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_STARTED"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
}
|
||||
],
|
||||
"fulfillments": [
|
||||
{
|
||||
"id": "F1",
|
||||
"customer": {
|
||||
"contact": {
|
||||
"phone": "9876556789"
|
||||
},
|
||||
"person": {
|
||||
"name": "Joe Adams"
|
||||
}
|
||||
},
|
||||
"stops": [
|
||||
{
|
||||
"location": {
|
||||
"gps": "13.008935, 77.644408"
|
||||
},
|
||||
"type": "START",
|
||||
"instructions": {
|
||||
"short_desc": "short description of the location",
|
||||
"long_desc": "long description of the location"
|
||||
}
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
"gps": "12.971186, 77.586812"
|
||||
},
|
||||
"type": "END"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ROUTE_INFO",
|
||||
"name": "Route Information"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ENCODED_POLYLINE",
|
||||
"name": "Path"
|
||||
},
|
||||
"value": "_p~iF~ps|U_ulLnnqC_mqNvxq`@"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "WAYPOINTS",
|
||||
"name": "Waypoints"
|
||||
},
|
||||
"value": "[{\"gps\":\"12.909982, 77.611822\"},{\"gps\":\"12.909982,77.611822\"},{\"gps\":\"12.909982,77.611822\"},{\"gps\":\"12.909982, 77.611822\"}]"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "DELIVERY",
|
||||
"vehicle": {
|
||||
"category": "AUTO_RICKSHAW",
|
||||
"variant": "EV"
|
||||
}
|
||||
}
|
||||
],
|
||||
"items": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "RIDE",
|
||||
"name": "Auto Ride"
|
||||
},
|
||||
"fulfillment_ids": [
|
||||
"F1"
|
||||
],
|
||||
"id": "I1",
|
||||
"location_ids": [
|
||||
"L1",
|
||||
"L3"
|
||||
],
|
||||
"payment_ids": [
|
||||
"PA1"
|
||||
],
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"maximum_value": "176",
|
||||
"minimum_value": "136",
|
||||
"value": "146"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "FARE_POLICY",
|
||||
"name": "Daytime Charges"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MIN_FARE"
|
||||
},
|
||||
"value": "30"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MIN_FARE_DISTANCE_KM"
|
||||
},
|
||||
"value": "2"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "PER_KM_CHARGE"
|
||||
},
|
||||
"value": "15"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "PICKUP_CHARGE"
|
||||
},
|
||||
"value": "10"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "WAITING_CHARGE_PER_MIN"
|
||||
},
|
||||
"value": "2"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_CHARGE_MULTIPLIER"
|
||||
},
|
||||
"value": "1.5"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_SHIFT_START_TIME"
|
||||
},
|
||||
"value": "22:00:00"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_SHIFT_END_TIME"
|
||||
},
|
||||
"value": "05:00:00"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "INFO",
|
||||
"name": "General Information"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "DISTANCE_TO_NEAREST_DRIVER_METER"
|
||||
},
|
||||
"value": "661"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ETA_TO_NEAREST_DRIVER_MIN"
|
||||
},
|
||||
"value": "3"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"payments": [
|
||||
{
|
||||
"collected_by": "BPP",
|
||||
"id": "PA1",
|
||||
"params": {
|
||||
"bank_account_number": "xxxxxxxxxxxxxx",
|
||||
"bank_code": "XXXXXXXX",
|
||||
"virtual_payment_address": "9988199772@okicic"
|
||||
},
|
||||
"status": "NOT-PAID",
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES_PERCENTAGE"
|
||||
},
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TERMS"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "DELAY_INTEREST"
|
||||
},
|
||||
"value": "5"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TYPE"
|
||||
},
|
||||
"value": "UPI"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_WINDOW"
|
||||
},
|
||||
"value": "PT2D"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_BASIS"
|
||||
},
|
||||
"value": "DELIVERY"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MANDATORY_ARBITRATION"
|
||||
},
|
||||
"value": "true"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "COURT_JURISDICTION"
|
||||
},
|
||||
"value": "New Delhi"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "STATIC_TERMS"
|
||||
},
|
||||
"value": "https://example-test-bpp.com/static-terms.txt"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_AMOUNT"
|
||||
},
|
||||
"value": "1.46"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "ON-FULFILLMENT"
|
||||
}
|
||||
],
|
||||
"provider": {
|
||||
"id": "P1"
|
||||
},
|
||||
"quote": {
|
||||
"breakup": [
|
||||
{
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "30"
|
||||
},
|
||||
"title": "BASE_FARE"
|
||||
},
|
||||
{
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "116"
|
||||
},
|
||||
"title": "DISTANCE_FARE"
|
||||
}
|
||||
],
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "146"
|
||||
},
|
||||
"ttl": "PT30S"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "on_rating",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "api.beckn.juspay.in/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "2a17e268-1dc4-4d1a-98a2-17554a50c7d2",
|
||||
"timestamp": "2023-03-23T05:41:15Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"feedback_ack": true,
|
||||
"rating_ack": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,208 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "on_search",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "21e54d3c-9c3b-47c1-aa3b-b0e7b20818ee",
|
||||
"timestamp": "2023-12-09T13:41:16.161Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"catalog": {
|
||||
"descriptor": {
|
||||
"name": "Mobility Services BPP"
|
||||
},
|
||||
"providers": [
|
||||
{
|
||||
"fulfillments": [
|
||||
{
|
||||
"id": "F1",
|
||||
"stops": [
|
||||
{
|
||||
"location": {
|
||||
"gps": "13.008935, 77.644408"
|
||||
},
|
||||
"type": "START",
|
||||
"instructions": {
|
||||
"short_desc": "short description of the location",
|
||||
"long_desc": "long description of the location"
|
||||
}
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
"gps": "12.971186, 77.586812"
|
||||
},
|
||||
"type": "END"
|
||||
}
|
||||
],
|
||||
"type": "DELIVERY",
|
||||
"vehicle": {
|
||||
"category": "AUTO_RICKSHAW",
|
||||
"variant": "AUTO_RICKSHAW"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "F2",
|
||||
"stops": [
|
||||
{
|
||||
"location": {
|
||||
"gps": "13.008935, 77.644408"
|
||||
},
|
||||
"type": "START",
|
||||
"instructions": {
|
||||
"short_desc": "short description of the location",
|
||||
"long_desc": "long description of the location"
|
||||
}
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
"gps": "12.971186, 77.586812"
|
||||
},
|
||||
"type": "END"
|
||||
}
|
||||
],
|
||||
"type": "DELIVERY",
|
||||
"vehicle": {
|
||||
"category": "CAB",
|
||||
"variant": "SEDAN"
|
||||
}
|
||||
}
|
||||
],
|
||||
"id": "P1",
|
||||
"items": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "RIDE",
|
||||
"name": "Auto Ride"
|
||||
},
|
||||
"fulfillment_ids": [
|
||||
"F1"
|
||||
],
|
||||
"id": "I1",
|
||||
"location_ids": [
|
||||
"L1",
|
||||
"L3"
|
||||
],
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"maximum_value": "176",
|
||||
"minimum_value": "136",
|
||||
"value": "146"
|
||||
}
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "RIDE",
|
||||
"name": "CAB Economy Ride"
|
||||
},
|
||||
"fulfillment_ids": [
|
||||
"F2"
|
||||
],
|
||||
"id": "I2",
|
||||
"location_ids": [
|
||||
"L2",
|
||||
"L4"
|
||||
],
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"maximum_value": "236",
|
||||
"minimum_value": "206",
|
||||
"value": "206"
|
||||
}
|
||||
}
|
||||
],
|
||||
"locations": [
|
||||
{
|
||||
"gps": "12.916468,77.608998",
|
||||
"id": "L1"
|
||||
},
|
||||
{
|
||||
"gps": "12.916714,77.609298",
|
||||
"id": "L2"
|
||||
},
|
||||
{
|
||||
"gps": "12.916573,77.615216",
|
||||
"id": "L3"
|
||||
},
|
||||
{
|
||||
"gps": "12.906857,77.604456",
|
||||
"id": "L4"
|
||||
}
|
||||
],
|
||||
"payments": [
|
||||
{
|
||||
"collected_by": "BAP",
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES_PERCENTAGE"
|
||||
},
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TERMS"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "DELAY_INTEREST"
|
||||
},
|
||||
"value": "5"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TYPE"
|
||||
},
|
||||
"value": "UPI"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MANDATORY_ARBITRATION"
|
||||
},
|
||||
"value": "true"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "COURT_JURISDICTION"
|
||||
},
|
||||
"value": "New Delhi"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "STATIC_TERMS"
|
||||
},
|
||||
"value": "https://example-test-bpp.com/static-terms.txt"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,208 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "on_select",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "8926b747-0362-4fcc-b795-0994a6287700",
|
||||
"timestamp": "2023-12-09T13:49:26.132Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"order": {
|
||||
"fulfillments": [
|
||||
{
|
||||
"id": "F1",
|
||||
"stops": [
|
||||
{
|
||||
"location": {
|
||||
"gps": "13.008935, 77.644408"
|
||||
},
|
||||
"type": "START",
|
||||
"instructions": {
|
||||
"short_desc": "short description of the location",
|
||||
"long_desc": "long description of the location"
|
||||
}
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
"gps": "12.971186, 77.586812"
|
||||
},
|
||||
"type": "END"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ROUTE_INFO",
|
||||
"name": "Route Information"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ENCODED_POLYLINE",
|
||||
"name": "Path"
|
||||
},
|
||||
"value": "_p~iF~ps|U_ulLnnqC_mqNvxq`@"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "WAYPOINTS",
|
||||
"name": "Waypoints"
|
||||
},
|
||||
"value": "[{\"gps\":\"12.909982, 77.611822\"},{\"gps\":\"12.909982,77.611822\"},{\"gps\":\"12.909982,77.611822\"},{\"gps\":\"12.909982, 77.611822\"}]"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "DELIVERY",
|
||||
"vehicle": {
|
||||
"category": "AUTO_RICKSHAW",
|
||||
"variant": "EV"
|
||||
}
|
||||
}
|
||||
],
|
||||
"items": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "RIDE",
|
||||
"name": "Auto Ride"
|
||||
},
|
||||
"fulfillment_ids": [
|
||||
"F1"
|
||||
],
|
||||
"id": "I1",
|
||||
"location_ids": [
|
||||
"L1",
|
||||
"L3"
|
||||
],
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"maximum_value": "176",
|
||||
"minimum_value": "136",
|
||||
"value": "146"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "FARE_POLICY",
|
||||
"name": "Daytime Charges"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MIN_FARE"
|
||||
},
|
||||
"value": "30"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MIN_FARE_DISTANCE_KM"
|
||||
},
|
||||
"value": "2"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "PER_KM_CHARGE"
|
||||
},
|
||||
"value": "15"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "PICKUP_CHARGE"
|
||||
},
|
||||
"value": "10"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "WAITING_CHARGE_PER_MIN"
|
||||
},
|
||||
"value": "2"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_CHARGE_MULTIPLIER"
|
||||
},
|
||||
"value": "1.5"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_SHIFT_START_TIME"
|
||||
},
|
||||
"value": "22:00:00"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_SHIFT_END_TIME"
|
||||
},
|
||||
"value": "05:00:00"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "INFO",
|
||||
"name": "General Information"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "DISTANCE_TO_NEAREST_DRIVER_METER"
|
||||
},
|
||||
"value": "661"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ETA_TO_NEAREST_DRIVER_MIN"
|
||||
},
|
||||
"value": "3"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"provider": {
|
||||
"id": "P1"
|
||||
},
|
||||
"quote": {
|
||||
"breakup": [
|
||||
{
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "30"
|
||||
},
|
||||
"title": "BASE_FARE"
|
||||
},
|
||||
{
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "116"
|
||||
},
|
||||
"title": "DISTANCE_FARE"
|
||||
}
|
||||
],
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "146"
|
||||
},
|
||||
"ttl": "P200s"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,383 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "on_status",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "5ee2001f-e612-431d-9e07-49574af60e88",
|
||||
"timestamp": "2023-03-23T04:49:34.53Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"order": {
|
||||
"cancellation_terms": [
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"percentage": "0"
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ASSIGNED"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
},
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"amount": {
|
||||
"currency": "INR",
|
||||
"value": "30"
|
||||
}
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ENROUTE_PICKUP"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
},
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"amount": {
|
||||
"currency": "INR",
|
||||
"value": "50"
|
||||
}
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ARRIVED_PICKUP"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
},
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"percentage": "100"
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_STARTED"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
}
|
||||
],
|
||||
"fulfillments": [
|
||||
{
|
||||
"agent": {
|
||||
"contact": {
|
||||
"phone": "9856798567"
|
||||
},
|
||||
"person": {
|
||||
"name": "Jason Roy"
|
||||
}
|
||||
},
|
||||
"customer": {
|
||||
"contact": {
|
||||
"phone": "9876556789"
|
||||
},
|
||||
"person": {
|
||||
"name": "Joe Adams"
|
||||
}
|
||||
},
|
||||
"id": "F1",
|
||||
"state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ENROUTE_PICKUP"
|
||||
}
|
||||
},
|
||||
"stops": [
|
||||
{
|
||||
"authorization": {
|
||||
"token": "234234",
|
||||
"type": "OTP",
|
||||
"valid_to": "2023-12-10T08:05:34.294Z",
|
||||
"status": "UNCLAIMED"
|
||||
},
|
||||
"location": {
|
||||
"gps": "13.008935, 77.644408"
|
||||
},
|
||||
"instructions": {
|
||||
"short_desc": "short description of the location",
|
||||
"long_desc": "long description of the location"
|
||||
},
|
||||
"type": "START"
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
"gps": "12.971186, 77.586812"
|
||||
},
|
||||
"type": "END"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ROUTE_INFO",
|
||||
"name": "Route Information"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ENCODED_POLYLINE",
|
||||
"name": "Path"
|
||||
},
|
||||
"value": "_p~iF~ps|U_ulLnnqC_mqNvxq`@"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "WAYPOINTS",
|
||||
"name": "Waypoints"
|
||||
},
|
||||
"value": "[{\"gps\":\"12.909982, 77.611822\"},{\"gps\":\"12.909982,77.611822\"},{\"gps\":\"12.909982,77.611822\"},{\"gps\":\"12.909982, 77.611822\"}]"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "DELIVERY",
|
||||
"vehicle": {
|
||||
"category": "AUTO_RICKSHAW",
|
||||
"variant": "EV",
|
||||
"make": "Bajaj",
|
||||
"model": "Compact RE",
|
||||
"registration": "KA-01-AD-9876"
|
||||
}
|
||||
}
|
||||
],
|
||||
"id": "O1",
|
||||
"items": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "RIDE",
|
||||
"name": "Auto Ride"
|
||||
},
|
||||
"fulfillment_ids": [
|
||||
"F1"
|
||||
],
|
||||
"id": "I1",
|
||||
"location_ids": [
|
||||
"L1",
|
||||
"L3"
|
||||
],
|
||||
"payment_ids": [
|
||||
"PA1"
|
||||
],
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"maximum_value": "176",
|
||||
"minimum_value": "136",
|
||||
"value": "146"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "FARE_POLICY",
|
||||
"name": "Daytime Charges"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MIN_FARE"
|
||||
},
|
||||
"value": "30"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MIN_FARE_DISTANCE_KM"
|
||||
},
|
||||
"value": "2"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "PER_KM_CHARGE"
|
||||
},
|
||||
"value": "15"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "PICKUP_CHARGE"
|
||||
},
|
||||
"value": "10"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "WAITING_CHARGE_PER_MIN"
|
||||
},
|
||||
"value": "2"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_CHARGE_MULTIPLIER"
|
||||
},
|
||||
"value": "1.5"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_SHIFT_START_TIME"
|
||||
},
|
||||
"value": "22:00:00"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_SHIFT_END_TIME"
|
||||
},
|
||||
"value": "05:00:00"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "INFO",
|
||||
"name": "General Information"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "DISTANCE_TO_NEAREST_DRIVER_METER"
|
||||
},
|
||||
"value": "661"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ETA_TO_NEAREST_DRIVER_MIN"
|
||||
},
|
||||
"value": "3"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"payments": [
|
||||
{
|
||||
"collected_by": "BPP",
|
||||
"id": "PA1",
|
||||
"params": {
|
||||
"bank_account_number": "xxxxxxxxxxxxxx",
|
||||
"bank_code": "XXXXXXXX",
|
||||
"virtual_payment_address": "9988199772@okicic"
|
||||
},
|
||||
"status": "NOT-PAID",
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES_PERCENTAGE"
|
||||
},
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TERMS"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "DELAY_INTEREST"
|
||||
},
|
||||
"value": "5"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TYPE"
|
||||
},
|
||||
"value": "UPI"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_WINDOW"
|
||||
},
|
||||
"value": "PT2D"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_BASIS"
|
||||
},
|
||||
"value": "DELIVERY"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MANDATORY_ARBITRATION"
|
||||
},
|
||||
"value": "true"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "COURT_JURISDICTION"
|
||||
},
|
||||
"value": "New Delhi"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "STATIC_TERMS"
|
||||
},
|
||||
"value": "https://example-test-bpp.com/static-terms.txt"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_AMOUNT"
|
||||
},
|
||||
"value": "1.46"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "ON-FULFILLMENT"
|
||||
}
|
||||
],
|
||||
"provider": {
|
||||
"id": "P1"
|
||||
},
|
||||
"quote": {
|
||||
"breakup": [
|
||||
{
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "30"
|
||||
},
|
||||
"title": "BASE_FARE"
|
||||
},
|
||||
{
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "116"
|
||||
},
|
||||
"title": "DISTANCE_FARE"
|
||||
}
|
||||
],
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "146"
|
||||
},
|
||||
"ttl": "PT30S"
|
||||
},
|
||||
"status": "ACTIVE",
|
||||
"created_at": "2023-03-23T04:48:34.53Z",
|
||||
"updated_at": "2023-03-23T04:49:34.53Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "on_support",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "ec3dea8c-c64c-4f06-b2a0-ec1f9584d7ba",
|
||||
"timestamp": "2023-03-23T05:41:09Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"support": {
|
||||
"email": "support@nammayatri.in",
|
||||
"phone": "+918068870525",
|
||||
"url": "https://support.nammayatri.com/gethelp"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "on_track",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "ec3dea8c-c64c-4f06-b2a0-ec1f9584d7ba",
|
||||
"timestamp": "2023-03-23T05:41:09Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"tracking": {
|
||||
"status": "active",
|
||||
"location": {
|
||||
"gps": "28.620976, 77.046732",
|
||||
"updated_at": "2023-03-23T05:41:09Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,361 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "on_update",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "8926b747-0362-4fcc-b795-0994a6287700",
|
||||
"timestamp": "2023-12-11T03:54:28.832Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"order": {
|
||||
"cancellation_terms": [
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"percentage": "0"
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ASSIGNED"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
},
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"amount": {
|
||||
"currency": "INR",
|
||||
"value": "30"
|
||||
}
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ENROUTE_PICKUP"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
},
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"amount": {
|
||||
"currency": "INR",
|
||||
"value": "50"
|
||||
}
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ARRIVED_PICKUP"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
},
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"percentage": "100"
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_STARTED"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
}
|
||||
],
|
||||
"fulfillments": [
|
||||
{
|
||||
"agent": {
|
||||
"contact": {
|
||||
"phone": "9856798567"
|
||||
},
|
||||
"person": {
|
||||
"name": "Jason Roy"
|
||||
}
|
||||
},
|
||||
"customer": {
|
||||
"contact": {
|
||||
"phone": "9876556789"
|
||||
},
|
||||
"person": {
|
||||
"name": "Joe Adams"
|
||||
}
|
||||
},
|
||||
"id": "F1",
|
||||
"state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ENDED"
|
||||
}
|
||||
},
|
||||
"stops": [
|
||||
{
|
||||
"authorization": {
|
||||
"token": "234234",
|
||||
"type": "OTP",
|
||||
"valid_to": "2023-12-10T08:05:34.294Z",
|
||||
"status": "CLAIMED"
|
||||
},
|
||||
"location": {
|
||||
"gps": "13.008935, 77.644408"
|
||||
},
|
||||
"type": "START",
|
||||
"instructions": {
|
||||
"short_desc": "short description of the location",
|
||||
"long_desc": "long description of the location"
|
||||
}
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
"gps": "12.971186, 77.586812"
|
||||
},
|
||||
"type": "END"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ROUTE_INFO",
|
||||
"name": "Route Information"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ENCODED_POLYLINE",
|
||||
"name": "Path"
|
||||
},
|
||||
"value": "_p~iF~ps|U_ulLnnqC_mqNvxq`@"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "WAYPOINTS",
|
||||
"name": "Waypoints"
|
||||
},
|
||||
"value": "[{\"gps\":\"12.909982, 77.611822\"},{\"gps\":\"12.909982,77.611822\"},{\"gps\":\"12.909982,77.611822\"},{\"gps\":\"12.909982, 77.611822\"}]"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "DELIVERY",
|
||||
"vehicle": {
|
||||
"category": "AUTO_RICKSHAW",
|
||||
"variant": "EV",
|
||||
"make": "Bajaj",
|
||||
"model": "Compact RE",
|
||||
"registration": "KA-01-AD-9876"
|
||||
}
|
||||
}
|
||||
],
|
||||
"id": "O1",
|
||||
"items": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "RIDE",
|
||||
"name": "Auto Ride"
|
||||
},
|
||||
"fulfillment_ids": [
|
||||
"F1"
|
||||
],
|
||||
"id": "I1",
|
||||
"location_ids": [
|
||||
"L1",
|
||||
"L3"
|
||||
],
|
||||
"payment_ids": [
|
||||
"PA1"
|
||||
],
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"maximum_value": "176",
|
||||
"minimum_value": "136",
|
||||
"value": "146"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "FARE_POLICY",
|
||||
"name": "Daytime Charges"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MIN_FARE"
|
||||
},
|
||||
"value": "30"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MIN_FARE_DISTANCE_KM"
|
||||
},
|
||||
"value": "2"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "PER_KM_CHARGE"
|
||||
},
|
||||
"value": "15"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "PICKUP_CHARGE"
|
||||
},
|
||||
"value": "10"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "WAITING_CHARGE_PER_MIN"
|
||||
},
|
||||
"value": "2"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_CHARGE_MULTIPLIER"
|
||||
},
|
||||
"value": "1.5"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_SHIFT_START_TIME"
|
||||
},
|
||||
"value": "22:00:00"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_SHIFT_END_TIME"
|
||||
},
|
||||
"value": "05:00:00"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"payments": [
|
||||
{
|
||||
"collected_by": "BPP",
|
||||
"id": "PA1",
|
||||
"params": {
|
||||
"bank_account_number": "xxxxxxxxxxxxxx",
|
||||
"bank_code": "XXXXXXXX",
|
||||
"virtual_payment_address": "9988199772@okicic"
|
||||
},
|
||||
"status": "NOT-PAID",
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES_PERCENTAGE"
|
||||
},
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TERMS"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "DELAY_INTEREST"
|
||||
},
|
||||
"value": "5"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TYPE"
|
||||
},
|
||||
"value": "UPI"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_WINDOW"
|
||||
},
|
||||
"value": "PT2D"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_BASIS"
|
||||
},
|
||||
"value": "DELIVERY"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MANDATORY_ARBITRATION"
|
||||
},
|
||||
"value": "true"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "COURT_JURISDICTION"
|
||||
},
|
||||
"value": "New Delhi"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "STATIC_TERMS"
|
||||
},
|
||||
"value": "https://example-test-bpp.com/static-terms.txt"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_AMOUNT"
|
||||
},
|
||||
"value": "1.46"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "ON-FULFILLMENT"
|
||||
}
|
||||
],
|
||||
"provider": {
|
||||
"id": "P1"
|
||||
},
|
||||
"quote": {
|
||||
"breakup": [
|
||||
{
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "30"
|
||||
},
|
||||
"title": "BASE_FARE"
|
||||
},
|
||||
{
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "116"
|
||||
},
|
||||
"title": "DISTANCE_FARE"
|
||||
}
|
||||
],
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "146"
|
||||
},
|
||||
"ttl": "PT30S"
|
||||
},
|
||||
"status": "ACTIVE",
|
||||
"created_at": "2023-12-10T08:03:34.294Z",
|
||||
"updated_at": "2023-12-11T03:54:28.832Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "rating",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "b462a835-97d6-4479-bec8-9660a0f8513e",
|
||||
"timestamp": "2023-03-23T04:46:45Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"id": "b0462745-f6c9-4100-bbe7-4fa3648b6b40",
|
||||
"rating_category": "DRIVER",
|
||||
"value": 4
|
||||
}
|
||||
}
|
||||
@@ -13,10 +13,10 @@
|
||||
}
|
||||
},
|
||||
"message_id": "40963dc1-e402-4f4d-ae70-7c5864ca682c",
|
||||
"timestamp": "2023-12-09T13:39:56.645Z",
|
||||
"timestamp": "2023-12-09T13:40:21.452Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.0"
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"intent": {
|
||||
@@ -37,7 +37,7 @@
|
||||
]
|
||||
},
|
||||
"payment": {
|
||||
"collected_by": "BPP",
|
||||
"collected_by": "BAP",
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
@@ -61,9 +61,15 @@
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "DELAY_INTEREST"
|
||||
"code": "SETTLEMENT_WINDOW"
|
||||
},
|
||||
"value": "5"
|
||||
"value": "PT1D"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_BASIS"
|
||||
},
|
||||
"value": "DELIVERY"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "select",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "432fdfd6-0457-47b6-9fac-80cbe5c0a75b",
|
||||
"timestamp": "2023-12-09T13:49:01.460Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "P120S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"order": {
|
||||
"items": [
|
||||
{
|
||||
"id": "I1"
|
||||
}
|
||||
],
|
||||
"provider": {
|
||||
"id": "P1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "status",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "8926b747-0362-4fcc-b795-0994a6287700",
|
||||
"timestamp": "2023-03-23T04:48:53Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "support",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "8926b747-0362-4fcc-b795-0994a6287700",
|
||||
"timestamp": "2023-03-23T04:48:53Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"ref_id": "7751bd26-3fdc-47ca-9b64-e998dc5abe68"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "track",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "8926b747-0362-4fcc-b795-0994a6287700",
|
||||
"timestamp": "2023-03-23T04:48:53Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"order_id": "O1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "update",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/trv10",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176",
|
||||
"timestamp": "2023-03-23T04:41:16Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"update_target": "order",
|
||||
"order": {
|
||||
"billing": {
|
||||
"email": "jane.doe@example.com",
|
||||
"name": "Jane Doe",
|
||||
"phone": "+91-9897867564"
|
||||
},
|
||||
"id": "O1",
|
||||
"provider": {
|
||||
"id": "P1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "cancel",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "api.beckn.juspay.in/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "be6a495a-e941-4fbf-9d59-f1e6166cccc8",
|
||||
"timestamp": "2023-03-23T05:15:08Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"cancellation_reason_id": "7",
|
||||
"descriptor": {
|
||||
"code": "SOFT_CANCEL",
|
||||
"name": "Ride Cancellation"
|
||||
},
|
||||
"order_id": "O1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,155 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "confirm",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176",
|
||||
"timestamp": "2023-12-10T04:34:48.031Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"order": {
|
||||
"billing": {
|
||||
"name": "Joe Adams"
|
||||
},
|
||||
"fulfillments": [
|
||||
{
|
||||
"customer": {
|
||||
"contact": {
|
||||
"phone": "9876556789"
|
||||
},
|
||||
"person": {
|
||||
"name": "Joe Adams"
|
||||
}
|
||||
},
|
||||
"id": "F1",
|
||||
"stops": [
|
||||
{
|
||||
"location": {
|
||||
"gps": "13.008935, 77.644408"
|
||||
},
|
||||
"type": "START"
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
"gps": "12.971186, 77.586812"
|
||||
},
|
||||
"type": "END"
|
||||
}
|
||||
],
|
||||
"vehicle": {
|
||||
"category": "AUTO_RICKSHAW",
|
||||
"variant": "EV"
|
||||
}
|
||||
}
|
||||
],
|
||||
"items": [
|
||||
{
|
||||
"id": "I1"
|
||||
}
|
||||
],
|
||||
"payments": [
|
||||
{
|
||||
"collected_by": "BPP",
|
||||
"id": "PA1",
|
||||
"params": {
|
||||
"bank_account_number": "xxxxxxxxxxxxxx",
|
||||
"bank_code": "XXXXXXXX",
|
||||
"virtual_payment_address": "9988199772@okicic"
|
||||
},
|
||||
"status": "NOT-PAID",
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES_PERCENTAGE"
|
||||
},
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TERMS"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_WINDOW"
|
||||
},
|
||||
"value": "PT60M"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_BASIS"
|
||||
},
|
||||
"value": "DELIVERY"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TYPE"
|
||||
},
|
||||
"value": "UPI"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MANDATORY_ARBITRATION"
|
||||
},
|
||||
"value": "true"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "COURT_JURISDICTION"
|
||||
},
|
||||
"value": "New Delhi"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "DELAY_INTEREST"
|
||||
},
|
||||
"value": "5"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "STATIC_TERMS"
|
||||
},
|
||||
"value": "https://example-test-bap.com/static-terms.txt"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_AMOUNT"
|
||||
},
|
||||
"value": "1.46"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "ON-FULFILLMENT"
|
||||
}
|
||||
],
|
||||
"provider": {
|
||||
"id": "P1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,148 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "init",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "8926b747-0362-4fcc-b795-0994a6287700",
|
||||
"timestamp": "2023-12-09T14:09:31.307Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"order": {
|
||||
"billing": {
|
||||
"name": "Joe Adams"
|
||||
},
|
||||
"fulfillments": [
|
||||
{
|
||||
"customer": {
|
||||
"contact": {
|
||||
"phone": "9876556789"
|
||||
},
|
||||
"person": {
|
||||
"name": "Joe Adams"
|
||||
}
|
||||
},
|
||||
"id": "F1",
|
||||
"stops": [
|
||||
{
|
||||
"location": {
|
||||
"gps": "13.008935, 77.644408"
|
||||
},
|
||||
"type": "START"
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
"gps": "12.971186, 77.586812"
|
||||
},
|
||||
"type": "END"
|
||||
}
|
||||
],
|
||||
"vehicle": {
|
||||
"category": "AUTO_RICKSHAW",
|
||||
"variant": "EV"
|
||||
}
|
||||
}
|
||||
],
|
||||
"items": [
|
||||
{
|
||||
"id": "I1"
|
||||
}
|
||||
],
|
||||
"payments": [
|
||||
{
|
||||
"collected_by": "BPP",
|
||||
"params": {
|
||||
"bank_account_number": "xxxxxxxxxxxxxx",
|
||||
"bank_code": "XXXXXXXX",
|
||||
"virtual_payment_address": "9988199772@okicic"
|
||||
},
|
||||
"status": "NOT-PAID",
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES_PERCENTAGE"
|
||||
},
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TERMS"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_WINDOW"
|
||||
},
|
||||
"value": "PT60M"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_BASIS"
|
||||
},
|
||||
"value": "DELIVERY"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TYPE"
|
||||
},
|
||||
"value": "UPI"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MANDATORY_ARBITRATION"
|
||||
},
|
||||
"value": "true"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "COURT_JURISDICTION"
|
||||
},
|
||||
"value": "New Delhi"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "DELAY_INTEREST"
|
||||
},
|
||||
"value": "5"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "STATIC_TERMS"
|
||||
},
|
||||
"value": "https://example-test-bpp.com/static-terms.txt"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "ON-FULFILLMENT"
|
||||
}
|
||||
],
|
||||
"provider": {
|
||||
"id": "P1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,390 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "on_cancel",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "8926b747-0362-4fcc-b795-0994a6287700",
|
||||
"timestamp": "2023-03-23T04:48:53Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"version": "2.0.1",
|
||||
"ttl": "PT30S"
|
||||
},
|
||||
"message": {
|
||||
"order": {
|
||||
"cancellation_terms": [
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"percentage": "0"
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ASSIGNED"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
},
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"amount": {
|
||||
"currency": "INR",
|
||||
"value": "30"
|
||||
}
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ENROUTE_PICKUP"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
},
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"amount": {
|
||||
"currency": "INR",
|
||||
"value": "50"
|
||||
}
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ARRIVED_PICKUP"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
},
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"percentage": "100"
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_STARTED"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
}
|
||||
],
|
||||
"fulfillments": [
|
||||
{
|
||||
"agent": {
|
||||
"contact": {
|
||||
"phone": "9856798567"
|
||||
},
|
||||
"person": {
|
||||
"name": "Jason Roy"
|
||||
}
|
||||
},
|
||||
"customer": {
|
||||
"contact": {
|
||||
"phone": "9876556789"
|
||||
},
|
||||
"person": {
|
||||
"name": "Joe Adams"
|
||||
}
|
||||
},
|
||||
"id": "F1",
|
||||
"state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ARRIVED_PICKUP"
|
||||
}
|
||||
},
|
||||
"stops": [
|
||||
{
|
||||
"authorization": {
|
||||
"token": "234234",
|
||||
"type": "OTP"
|
||||
},
|
||||
"location": {
|
||||
"gps": "13.008935, 77.644408"
|
||||
},
|
||||
"time": {
|
||||
"duration": "PT2H"
|
||||
},
|
||||
"type": "START",
|
||||
"instructions": {
|
||||
"short_desc": "short description of the location",
|
||||
"long_desc": "long description of the location"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ROUTE_INFO",
|
||||
"name": "Route Information"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ENCODED_POLYLINE",
|
||||
"name": "Path"
|
||||
},
|
||||
"value": "_p~iF~ps|U_ulLnnqC_mqNvxq`@"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "WAYPOINTS",
|
||||
"name": "Waypoints"
|
||||
},
|
||||
"value": "[{\"gps\":\"12.909982, 77.611822\"},{\"gps\":\"12.909982,77.611822\"},{\"gps\":\"12.909982,77.611822\"},{\"gps\":\"12.909982, 77.611822\"}]"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "DELIVERY",
|
||||
"vehicle": {
|
||||
"category": "AUTO_RICKSHAW",
|
||||
"variant": "EV",
|
||||
"make": "Bajaj",
|
||||
"model": "Compact RE",
|
||||
"registration": "KA-01-AD-9876"
|
||||
}
|
||||
}
|
||||
],
|
||||
"id": "O1",
|
||||
"items": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "RIDE",
|
||||
"name": "CAB Ride"
|
||||
},
|
||||
"fulfillment_ids": [
|
||||
"F1"
|
||||
],
|
||||
"id": "I1",
|
||||
"location_ids": [
|
||||
"L1",
|
||||
"L3"
|
||||
],
|
||||
"payment_ids": [
|
||||
"PA1"
|
||||
],
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"maximum_value": "176",
|
||||
"minimum_value": "156",
|
||||
"value": "146"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "FARE_POLICY",
|
||||
"name": "Daytime Charges"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MIN_FARE"
|
||||
},
|
||||
"value": "30"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MIN_FARE_DISTANCE_KM"
|
||||
},
|
||||
"value": "2"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "PER_KM_CHARGE"
|
||||
},
|
||||
"value": "15"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "PICKUP_CHARGE"
|
||||
},
|
||||
"value": "10"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "WAITING_CHARGE_PER_MIN"
|
||||
},
|
||||
"value": "2"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_CHARGE_MULTIPLIER"
|
||||
},
|
||||
"value": "1.5"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_SHIFT_START_TIME"
|
||||
},
|
||||
"value": "22:00:00"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_SHIFT_END_TIME"
|
||||
},
|
||||
"value": "05:00:00"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "INFO",
|
||||
"name": "General Information"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "DISTANCE_TO_NEAREST_DRIVER_METER"
|
||||
},
|
||||
"value": "661"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ETA_TO_NEAREST_DRIVER_MIN"
|
||||
},
|
||||
"value": "3"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"payments": [
|
||||
{
|
||||
"collected_by": "BAP",
|
||||
"id": "PA1",
|
||||
"params": {
|
||||
"bank_account_number": "xxxxxxxxxxxxxx",
|
||||
"bank_code": "XXXXXXXX",
|
||||
"virtual_payment_address": "9988199772@okicic"
|
||||
},
|
||||
"status": "NOT-PAID",
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES_PERCENTAGE"
|
||||
},
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TERMS"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_WINDOW"
|
||||
},
|
||||
"value": "PT60M"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_BASIS"
|
||||
},
|
||||
"value": "Delivery"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TYPE"
|
||||
},
|
||||
"value": "UPI"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MANDATORY_ARBITRATION"
|
||||
},
|
||||
"value": "true"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "COURT_JURISDICTION"
|
||||
},
|
||||
"value": "New Delhi"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "DELAY_INTEREST"
|
||||
},
|
||||
"value": "2.5"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "STATIC_TERMS"
|
||||
},
|
||||
"value": "https://www.icicibank.com/personal-banking/loans/personal-loan"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_AMOUNT"
|
||||
},
|
||||
"value": "85"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "ON-FULFILLMENT"
|
||||
}
|
||||
],
|
||||
"provider": {
|
||||
"id": "P1"
|
||||
},
|
||||
"quote": {
|
||||
"breakup": [
|
||||
{
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "30"
|
||||
},
|
||||
"title": "BASE_FARE"
|
||||
},
|
||||
{
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "116"
|
||||
},
|
||||
"title": "DISTANCE_FARE"
|
||||
},
|
||||
{
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "10"
|
||||
},
|
||||
"title": "CANCELLATION_CHARGES"
|
||||
},
|
||||
{
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "-146"
|
||||
},
|
||||
"title": "REFUND"
|
||||
}
|
||||
],
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "10"
|
||||
},
|
||||
"ttl": "P200S"
|
||||
},
|
||||
"status": "SOFT_CANCEL"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,383 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "on_confirm",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "8926b747-0362-4fcc-b795-0994a6287700",
|
||||
"timestamp": "2023-12-10T08:03:34.294Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"order": {
|
||||
"cancellation_terms": [
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"percentage": "0"
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ASSIGNED"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
},
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"amount": {
|
||||
"currency": "INR",
|
||||
"value": "30"
|
||||
}
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ENROUTE_PICKUP"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
},
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"amount": {
|
||||
"currency": "INR",
|
||||
"value": "50"
|
||||
}
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ARRIVED_PICKUP"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
},
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"percentage": "100"
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_STARTED"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
}
|
||||
],
|
||||
"fulfillments": [
|
||||
{
|
||||
"agent": {
|
||||
"contact": {
|
||||
"phone": "9856798567"
|
||||
},
|
||||
"person": {
|
||||
"name": "Jason Roy"
|
||||
}
|
||||
},
|
||||
"customer": {
|
||||
"contact": {
|
||||
"phone": "9876556789"
|
||||
},
|
||||
"person": {
|
||||
"name": "Joe Adams"
|
||||
}
|
||||
},
|
||||
"id": "F1",
|
||||
"state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ASSIGNED"
|
||||
}
|
||||
},
|
||||
"stops": [
|
||||
{
|
||||
"authorization": {
|
||||
"token": "234234",
|
||||
"type": "OTP",
|
||||
"valid_to": "2023-12-10T08:05:34.294Z",
|
||||
"status": "UNCLAIMED"
|
||||
},
|
||||
"location": {
|
||||
"gps": "13.008935, 77.644408"
|
||||
},
|
||||
"type": "START",
|
||||
"instructions": {
|
||||
"short_desc": "short description of the location",
|
||||
"long_desc": "long description of the location"
|
||||
}
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
"gps": "12.971186, 77.586812"
|
||||
},
|
||||
"type": "END"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ROUTE_INFO",
|
||||
"name": "Route Information"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ENCODED_POLYLINE",
|
||||
"name": "Path"
|
||||
},
|
||||
"value": "_p~iF~ps|U_ulLnnqC_mqNvxq`@"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "WAYPOINTS",
|
||||
"name": "Waypoints"
|
||||
},
|
||||
"value": "[{\"gps\":\"12.909982, 77.611822\"},{\"gps\":\"12.909982,77.611822\"},{\"gps\":\"12.909982,77.611822\"},{\"gps\":\"12.909982, 77.611822\"}]"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "DELIVERY",
|
||||
"vehicle": {
|
||||
"category": "AUTO_RICKSHAW",
|
||||
"variant": "EV",
|
||||
"make": "Bajaj",
|
||||
"model": "Compact RE",
|
||||
"registration": "KA-01-AD-9876"
|
||||
}
|
||||
}
|
||||
],
|
||||
"id": "O1",
|
||||
"items": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "RIDE",
|
||||
"name": "Auto Ride"
|
||||
},
|
||||
"fulfillment_ids": [
|
||||
"F1"
|
||||
],
|
||||
"id": "I1",
|
||||
"location_ids": [
|
||||
"L1",
|
||||
"L3"
|
||||
],
|
||||
"payment_ids": [
|
||||
"PA1"
|
||||
],
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"maximum_value": "176",
|
||||
"minimum_value": "136",
|
||||
"value": "146"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "FARE_POLICY",
|
||||
"name": "Daytime Charges"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MIN_FARE"
|
||||
},
|
||||
"value": "30"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MIN_FARE_DISTANCE_KM"
|
||||
},
|
||||
"value": "2"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "PER_KM_CHARGE"
|
||||
},
|
||||
"value": "15"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "PICKUP_CHARGE"
|
||||
},
|
||||
"value": "10"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "WAITING_CHARGE_PER_MIN"
|
||||
},
|
||||
"value": "2"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_CHARGE_MULTIPLIER"
|
||||
},
|
||||
"value": "1.5"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_SHIFT_START_TIME"
|
||||
},
|
||||
"value": "22:00:00"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_SHIFT_END_TIME"
|
||||
},
|
||||
"value": "05:00:00"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "INFO",
|
||||
"name": "General Information"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "DISTANCE_TO_NEAREST_DRIVER_METER"
|
||||
},
|
||||
"value": "661"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ETA_TO_NEAREST_DRIVER_MIN"
|
||||
},
|
||||
"value": "3"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"payments": [
|
||||
{
|
||||
"collected_by": "BPP",
|
||||
"id": "PA1",
|
||||
"params": {
|
||||
"bank_account_number": "xxxxxxxxxxxxxx",
|
||||
"bank_code": "XXXXXXXX",
|
||||
"virtual_payment_address": "9988199772@okicic"
|
||||
},
|
||||
"status": "NOT-PAID",
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES_PERCENTAGE"
|
||||
},
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TERMS"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "DELAY_INTEREST"
|
||||
},
|
||||
"value": "5"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TYPE"
|
||||
},
|
||||
"value": "UPI"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_WINDOW"
|
||||
},
|
||||
"value": "PT2D"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_BASIS"
|
||||
},
|
||||
"value": "DELIVERY"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MANDATORY_ARBITRATION"
|
||||
},
|
||||
"value": "true"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "COURT_JURISDICTION"
|
||||
},
|
||||
"value": "New Delhi"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "STATIC_TERMS"
|
||||
},
|
||||
"value": "https://example-test-bpp.com/static-terms.txt"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_AMOUNT"
|
||||
},
|
||||
"value": "1.46"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "ON-FULFILLMENT"
|
||||
}
|
||||
],
|
||||
"provider": {
|
||||
"id": "P1"
|
||||
},
|
||||
"quote": {
|
||||
"breakup": [
|
||||
{
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "30"
|
||||
},
|
||||
"title": "BASE_FARE"
|
||||
},
|
||||
{
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "116"
|
||||
},
|
||||
"title": "DISTANCE_FARE"
|
||||
}
|
||||
],
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "146"
|
||||
},
|
||||
"ttl": "PT30S"
|
||||
},
|
||||
"status": "ACTIVE",
|
||||
"created_at": "2023-12-10T08:03:34.294Z",
|
||||
"updated_at": "2023-12-10T08:03:34.294Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,357 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "on_init",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "8926b747-0362-4fcc-b795-0994a6287700",
|
||||
"timestamp": "2023-12-09T14:11:32.859Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"order": {
|
||||
"cancellation_terms": [
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"percentage": "0"
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ASSIGNED"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
},
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"amount": {
|
||||
"currency": "INR",
|
||||
"value": "30"
|
||||
}
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ENROUTE_PICKUP"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
},
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"amount": {
|
||||
"currency": "INR",
|
||||
"value": "50"
|
||||
}
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_ARRIVED_PICKUP"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
},
|
||||
{
|
||||
"cancellation_fee": {
|
||||
"percentage": "100"
|
||||
},
|
||||
"fulfillment_state": {
|
||||
"descriptor": {
|
||||
"code": "RIDE_STARTED"
|
||||
}
|
||||
},
|
||||
"reason_required": true
|
||||
}
|
||||
],
|
||||
"fulfillments": [
|
||||
{
|
||||
"id": "F1",
|
||||
"customer": {
|
||||
"contact": {
|
||||
"phone": "9876556789"
|
||||
},
|
||||
"person": {
|
||||
"name": "Joe Adams"
|
||||
}
|
||||
},
|
||||
"stops": [
|
||||
{
|
||||
"location": {
|
||||
"gps": "13.008935, 77.644408"
|
||||
},
|
||||
"type": "START",
|
||||
"instructions": {
|
||||
"short_desc": "short description of the location",
|
||||
"long_desc": "long description of the location"
|
||||
}
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
"gps": "12.971186, 77.586812"
|
||||
},
|
||||
"type": "END"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ROUTE_INFO",
|
||||
"name": "Route Information"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ENCODED_POLYLINE",
|
||||
"name": "Path"
|
||||
},
|
||||
"value": "_p~iF~ps|U_ulLnnqC_mqNvxq`@"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "WAYPOINTS",
|
||||
"name": "Waypoints"
|
||||
},
|
||||
"value": "[{\"gps\":\"12.909982, 77.611822\"},{\"gps\":\"12.909982,77.611822\"},{\"gps\":\"12.909982,77.611822\"},{\"gps\":\"12.909982, 77.611822\"}]"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "DELIVERY",
|
||||
"vehicle": {
|
||||
"category": "AUTO_RICKSHAW",
|
||||
"variant": "EV"
|
||||
}
|
||||
}
|
||||
],
|
||||
"items": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "RIDE",
|
||||
"name": "Auto Ride"
|
||||
},
|
||||
"fulfillment_ids": [
|
||||
"F1"
|
||||
],
|
||||
"id": "I1",
|
||||
"location_ids": [
|
||||
"L1",
|
||||
"L3"
|
||||
],
|
||||
"payment_ids": [
|
||||
"PA1"
|
||||
],
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"maximum_value": "176",
|
||||
"minimum_value": "136",
|
||||
"value": "146"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "FARE_POLICY",
|
||||
"name": "Daytime Charges"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MIN_FARE"
|
||||
},
|
||||
"value": "30"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MIN_FARE_DISTANCE_KM"
|
||||
},
|
||||
"value": "2"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "PER_KM_CHARGE"
|
||||
},
|
||||
"value": "15"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "PICKUP_CHARGE"
|
||||
},
|
||||
"value": "10"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "WAITING_CHARGE_PER_MIN"
|
||||
},
|
||||
"value": "2"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_CHARGE_MULTIPLIER"
|
||||
},
|
||||
"value": "1.5"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_SHIFT_START_TIME"
|
||||
},
|
||||
"value": "22:00:00"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_SHIFT_END_TIME"
|
||||
},
|
||||
"value": "05:00:00"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "INFO",
|
||||
"name": "General Information"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "DISTANCE_TO_NEAREST_DRIVER_METER"
|
||||
},
|
||||
"value": "661"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ETA_TO_NEAREST_DRIVER_MIN"
|
||||
},
|
||||
"value": "3"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"payments": [
|
||||
{
|
||||
"collected_by": "BPP",
|
||||
"id": "PA1",
|
||||
"params": {
|
||||
"bank_account_number": "xxxxxxxxxxxxxx",
|
||||
"bank_code": "XXXXXXXX",
|
||||
"virtual_payment_address": "9988199772@okicic"
|
||||
},
|
||||
"status": "NOT-PAID",
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES_PERCENTAGE"
|
||||
},
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TERMS"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "DELAY_INTEREST"
|
||||
},
|
||||
"value": "5"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TYPE"
|
||||
},
|
||||
"value": "UPI"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_WINDOW"
|
||||
},
|
||||
"value": "PT2D"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_BASIS"
|
||||
},
|
||||
"value": "DELIVERY"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MANDATORY_ARBITRATION"
|
||||
},
|
||||
"value": "true"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "COURT_JURISDICTION"
|
||||
},
|
||||
"value": "New Delhi"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "STATIC_TERMS"
|
||||
},
|
||||
"value": "https://example-test-bpp.com/static-terms.txt"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_AMOUNT"
|
||||
},
|
||||
"value": "1.46"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "ON-FULFILLMENT"
|
||||
}
|
||||
],
|
||||
"provider": {
|
||||
"id": "P1"
|
||||
},
|
||||
"quote": {
|
||||
"breakup": [
|
||||
{
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "30"
|
||||
},
|
||||
"title": "BASE_FARE"
|
||||
},
|
||||
{
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "116"
|
||||
},
|
||||
"title": "DISTANCE_FARE"
|
||||
}
|
||||
],
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "146"
|
||||
},
|
||||
"ttl": "PT30S"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "on_rating",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "api.beckn.juspay.in/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "2a17e268-1dc4-4d1a-98a2-17554a50c7d2",
|
||||
"timestamp": "2023-03-23T05:41:15Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"feedback_ack": true,
|
||||
"rating_ack": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,221 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "on_search",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "21e54d3c-9c3b-47c1-aa3b-b0e7b20818ee",
|
||||
"timestamp": "2023-12-09T13:41:16.161Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"catalog": {
|
||||
"descriptor": {
|
||||
"name": "Mobility Servies BPP"
|
||||
},
|
||||
"providers": [
|
||||
{
|
||||
"fulfillments": [
|
||||
{
|
||||
"id": "F1",
|
||||
"stops": [
|
||||
{
|
||||
"location": {
|
||||
"gps": "13.008935, 77.644408"
|
||||
},
|
||||
"type": "START",
|
||||
"instructions": {
|
||||
"short_desc": "short description of the location",
|
||||
"long_desc": "long description of the location"
|
||||
}
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
"gps": "12.971186, 77.586812"
|
||||
},
|
||||
"type": "END"
|
||||
}
|
||||
],
|
||||
"type": "DELIVERY",
|
||||
"vehicle": {
|
||||
"category": "AUTO_RICKSHAW",
|
||||
"variant": "EV"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "F2",
|
||||
"stops": [
|
||||
{
|
||||
"location": {
|
||||
"gps": "13.008935, 77.644408"
|
||||
},
|
||||
"type": "START",
|
||||
"instructions": {
|
||||
"short_desc": "short description of the location",
|
||||
"long_desc": "long description of the location"
|
||||
}
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
"gps": "12.971186, 77.586812"
|
||||
},
|
||||
"type": "END"
|
||||
}
|
||||
],
|
||||
"type": "DELIVERY",
|
||||
"vehicle": {
|
||||
"category": "CAB",
|
||||
"variant": "SEDAN"
|
||||
}
|
||||
}
|
||||
],
|
||||
"id": "P1",
|
||||
"items": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "RIDE",
|
||||
"name": "Auto Ride"
|
||||
},
|
||||
"fulfillment_ids": [
|
||||
"F1"
|
||||
],
|
||||
"id": "I1",
|
||||
"location_ids": [
|
||||
"L1",
|
||||
"L3"
|
||||
],
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"maximum_value": "176",
|
||||
"minimum_value": "136",
|
||||
"value": "146"
|
||||
}
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "RIDE",
|
||||
"name": "CAB Economy Ride"
|
||||
},
|
||||
"fulfillment_ids": [
|
||||
"F2"
|
||||
],
|
||||
"id": "I2",
|
||||
"location_ids": [
|
||||
"L2",
|
||||
"L4"
|
||||
],
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"maximum_value": "236",
|
||||
"minimum_value": "206",
|
||||
"value": "206"
|
||||
}
|
||||
}
|
||||
],
|
||||
"locations": [
|
||||
{
|
||||
"gps": "12.916468,77.608998",
|
||||
"id": "L1"
|
||||
},
|
||||
{
|
||||
"gps": "12.916714,77.609298",
|
||||
"id": "L2"
|
||||
},
|
||||
{
|
||||
"gps": "12.916573,77.615216",
|
||||
"id": "L3"
|
||||
},
|
||||
{
|
||||
"gps": "12.906857,77.604456",
|
||||
"id": "L4"
|
||||
}
|
||||
],
|
||||
"payments": [
|
||||
{
|
||||
"collected_by": "BPP",
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "BUYER_FINDER_FEES_PERCENTAGE"
|
||||
},
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TERMS"
|
||||
},
|
||||
"display": false,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_WINDOW"
|
||||
},
|
||||
"value": "PT60M"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_BASIS"
|
||||
},
|
||||
"value": "DELIVERY"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "SETTLEMENT_TYPE"
|
||||
},
|
||||
"value": "UPI"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MANDATORY_ARBITRATION"
|
||||
},
|
||||
"value": "true"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "COURT_JURISDICTION"
|
||||
},
|
||||
"value": "New Delhi"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "DELAY_INTEREST"
|
||||
},
|
||||
"value": "5"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "STATIC_TERMS"
|
||||
},
|
||||
"value": "https://example-test-bpp.com/static-terms.txt"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,209 @@
|
||||
{
|
||||
"context": {
|
||||
"action": "on_select",
|
||||
"bap_id": "example-bap.com",
|
||||
"bap_uri": "https://example-bap.com/prod/trv10",
|
||||
"bpp_id": "example-bpp.com",
|
||||
"bpp_uri": "https://example-bpp.com/prod/seller",
|
||||
"domain": "ONDC:TRV10",
|
||||
"location": {
|
||||
"city": {
|
||||
"code": "std:080"
|
||||
},
|
||||
"country": {
|
||||
"code": "IND"
|
||||
}
|
||||
},
|
||||
"message_id": "8926b747-0362-4fcc-b795-0994a6287700",
|
||||
"timestamp": "2023-12-09T13:49:26.132Z",
|
||||
"transaction_id": "870782be-6757-43f1-945c-8eeaf9536259",
|
||||
"ttl": "PT30S",
|
||||
"version": "2.0.1"
|
||||
},
|
||||
"message": {
|
||||
"order": {
|
||||
"fulfillments": [
|
||||
{
|
||||
"id": "F1",
|
||||
"stops": [
|
||||
{
|
||||
"location": {
|
||||
"gps": "13.008935, 77.644408"
|
||||
},
|
||||
"type": "START",
|
||||
"instructions": {
|
||||
"short_desc": "short description of the location",
|
||||
"long_desc": "long description of the location"
|
||||
}
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
"gps": "12.971186, 77.586812"
|
||||
},
|
||||
"type": "END"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ROUTE_INFO",
|
||||
"name": "Route Information"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ENCODED_POLYLINE",
|
||||
"name": "Path"
|
||||
},
|
||||
"value": "_p~iF~ps|U_ulLnnqC_mqNvxq`@"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "WAYPOINTS",
|
||||
"name": "Waypoints"
|
||||
},
|
||||
"value": "[{\"gps\":\"12.909982, 77.611822\"},{\"gps\":\"12.909982,77.611822\"},{\"gps\":\"12.909982,77.611822\"},{\"gps\":\"12.909982, 77.611822\"}]"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "DELIVERY",
|
||||
"vehicle": {
|
||||
"category": "AUTO_RICKSHAW",
|
||||
"variant": "EV"
|
||||
}
|
||||
}
|
||||
],
|
||||
"items": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "RIDE",
|
||||
"name": "Auto Ride"
|
||||
},
|
||||
"fulfillment_ids": [
|
||||
"F1"
|
||||
],
|
||||
"id": "I1",
|
||||
"location_ids": [
|
||||
"L1",
|
||||
"L3"
|
||||
],
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"maximum_value": "176",
|
||||
"minimum_value": "136",
|
||||
"value": "146"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "FARE_POLICY",
|
||||
"name": "Daytime Charges"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MIN_FARE"
|
||||
},
|
||||
"value": "30"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "MIN_FARE_DISTANCE_KM"
|
||||
},
|
||||
"value": "2"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "PER_KM_CHARGE"
|
||||
},
|
||||
"value": "15"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "PICKUP_CHARGE"
|
||||
},
|
||||
"value": "10"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "WAITING_CHARGE_PER_MIN"
|
||||
},
|
||||
"value": "2"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_CHARGE_MULTIPLIER"
|
||||
},
|
||||
"value": "1.5"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_SHIFT_START_TIME"
|
||||
},
|
||||
"value": "22:00:00"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "NIGHT_SHIFT_END_TIME"
|
||||
},
|
||||
"value": "05:00:00"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "INFO",
|
||||
"name": "General Information"
|
||||
},
|
||||
"display": true,
|
||||
"list": [
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "DISTANCE_TO_NEAREST_DRIVER_METER"
|
||||
},
|
||||
"value": "661"
|
||||
},
|
||||
{
|
||||
"descriptor": {
|
||||
"code": "ETA_TO_NEAREST_DRIVER_MIN"
|
||||
},
|
||||
"value": "3"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"provider": {
|
||||
"id": "P1"
|
||||
},
|
||||
"quote": {
|
||||
"breakup": [
|
||||
{
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "30"
|
||||
},
|
||||
"title": "BASE_FARE"
|
||||
},
|
||||
{
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "116"
|
||||
},
|
||||
"title": "DISTANCE_FARE"
|
||||
}
|
||||
],
|
||||
"price": {
|
||||
"currency": "INR",
|
||||
"value": "146"
|
||||
},
|
||||
"ttl": "P200s"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user