{
  "openapi": "3.1.0",
  "info": {
    "description": "Qualified official Dominican fuel prices with explicit units and effective periods.",
    "title": "Indexa Fuel Prices API",
    "version": "1.0.0"
  },
  "components": {
    "schemas": {}
  },
  "paths": {
    "/v1/fuels": {
      "get": {
        "operationId": "listFuels",
        "summary": "List fuel products",
        "tags": [
          "Fuel prices"
        ],
        "description": "List stable Dominican fuel products and qualified price availability.",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "fuels"
                  ],
                  "properties": {
                    "fuels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "name",
                          "lifecycle",
                          "observedFrom",
                          "observedThrough",
                          "currentAvailable",
                          "historicalAvailable",
                          "units"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1
                          },
                          "lifecycle": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "current"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "historical-only"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "unresolved"
                                ]
                              }
                            ]
                          },
                          "observedFrom": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "observedThrough": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "currentAvailable": {
                            "type": "boolean"
                          },
                          "historicalAvailable": {
                            "type": "boolean"
                          },
                          "units": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "CUBIC_METER"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "MMBTU"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "METRIC_TON"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "US_GALLON"
                                  ]
                                }
                              ]
                            },
                            "uniqueItems": true
                          }
                        },
                        "additionalProperties": false
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message",
                        "requestId",
                        "retryable"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "requestId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "retryable": {
                          "type": "boolean"
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/fuels/{fuel}": {
      "get": {
        "operationId": "getFuel",
        "summary": "Get a fuel product",
        "tags": [
          "Fuel prices"
        ],
        "description": "Get one fuel product and its qualified external classifications.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            },
            "in": "path",
            "name": "fuel",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "name",
                    "lifecycle",
                    "observedFrom",
                    "observedThrough",
                    "currentAvailable",
                    "historicalAvailable",
                    "units",
                    "classifications"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1
                    },
                    "lifecycle": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "current"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "historical-only"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "unresolved"
                          ]
                        }
                      ]
                    },
                    "observedFrom": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "observedThrough": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "currentAvailable": {
                      "type": "boolean"
                    },
                    "historicalAvailable": {
                      "type": "boolean"
                    },
                    "units": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "CUBIC_METER"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "MMBTU"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "METRIC_TON"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "US_GALLON"
                            ]
                          }
                        ]
                      },
                      "uniqueItems": true
                    },
                    "classifications": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "scheme",
                          "version",
                          "code",
                          "relation",
                          "status",
                          "validFrom",
                          "validTo",
                          "sourceUrl"
                        ],
                        "properties": {
                          "scheme": {
                            "type": "string",
                            "minLength": 1
                          },
                          "version": {
                            "type": "string",
                            "minLength": 1
                          },
                          "code": {
                            "type": "string",
                            "minLength": 1
                          },
                          "relation": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "exact"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "broader"
                                ]
                              }
                            ]
                          },
                          "status": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "confirmed"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "broader-only"
                                ]
                              }
                            ]
                          },
                          "validFrom": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "validTo": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "sourceUrl": {
                            "type": "string",
                            "format": "uri"
                          }
                        },
                        "additionalProperties": false
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message",
                        "requestId",
                        "retryable"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "requestId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "retryable": {
                          "type": "boolean"
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message",
                        "requestId",
                        "retryable"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "requestId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "retryable": {
                          "type": "boolean"
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message",
                        "requestId",
                        "retryable"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "requestId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "retryable": {
                          "type": "boolean"
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/fuel-prices": {
      "get": {
        "operationId": "getFuelPrices",
        "summary": "Get applicable fuel prices",
        "tags": [
          "Fuel prices"
        ],
        "description": "Return qualified official public-consumer prices applicable on a Dominican calendar date.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "deliveryMode",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "effectiveOn",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "fuel",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "effectiveOn",
                    "prices"
                  ],
                  "properties": {
                    "effectiveOn": {
                      "type": "string",
                      "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
                    },
                    "prices": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "fuel",
                          "name",
                          "amount",
                          "currency",
                          "unit",
                          "priceContext",
                          "saleStage",
                          "effectiveFrom",
                          "effectiveTo",
                          "publishedAt",
                          "resolutionNumber",
                          "sourceUrl"
                        ],
                        "properties": {
                          "fuel": {
                            "type": "string",
                            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1
                          },
                          "amount": {
                            "type": "string",
                            "pattern": "^[0-9]+(?:\\.[0-9]+)?$"
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "DOP"
                            ]
                          },
                          "unit": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "CUBIC_METER"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "MMBTU"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "METRIC_TON"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "US_GALLON"
                                ]
                              }
                            ]
                          },
                          "priceContext": {
                            "type": "string",
                            "enum": [
                              "public-consumer"
                            ]
                          },
                          "saleStage": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "filling-plant-to-public"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "retail"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "station-to-public"
                                ]
                              }
                            ]
                          },
                          "deliveryMode": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "cng"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "lng"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "traditional-pipeline"
                                ]
                              }
                            ]
                          },
                          "effectiveFrom": {
                            "type": "string",
                            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
                          },
                          "effectiveTo": {
                            "type": "string",
                            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
                          },
                          "publishedAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "resolutionNumber": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "sourceUrl": {
                            "type": "string",
                            "format": "uri"
                          }
                        },
                        "additionalProperties": false
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message",
                        "requestId",
                        "retryable"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "requestId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "retryable": {
                          "type": "boolean"
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message",
                        "requestId",
                        "retryable"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "requestId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "retryable": {
                          "type": "boolean"
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message",
                        "requestId",
                        "retryable"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "requestId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "retryable": {
                          "type": "boolean"
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/fuel-prices/history": {
      "get": {
        "operationId": "getFuelPriceHistory",
        "summary": "Get fuel-price history",
        "tags": [
          "Fuel prices"
        ],
        "description": "Return qualified schedules whose inclusive effective intervals overlap the requested dates.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "cursor",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "deliveryMode",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "from",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "fuel",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "to",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "nextCursor",
                    "prices"
                  ],
                  "properties": {
                    "nextCursor": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "prices": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "fuel",
                          "name",
                          "amount",
                          "currency",
                          "unit",
                          "priceContext",
                          "saleStage",
                          "effectiveFrom",
                          "effectiveTo",
                          "publishedAt",
                          "resolutionNumber",
                          "sourceUrl"
                        ],
                        "properties": {
                          "fuel": {
                            "type": "string",
                            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1
                          },
                          "amount": {
                            "type": "string",
                            "pattern": "^[0-9]+(?:\\.[0-9]+)?$"
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "DOP"
                            ]
                          },
                          "unit": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "CUBIC_METER"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "MMBTU"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "METRIC_TON"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "US_GALLON"
                                ]
                              }
                            ]
                          },
                          "priceContext": {
                            "type": "string",
                            "enum": [
                              "public-consumer"
                            ]
                          },
                          "saleStage": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "filling-plant-to-public"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "retail"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "station-to-public"
                                ]
                              }
                            ]
                          },
                          "deliveryMode": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "cng"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "lng"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "traditional-pipeline"
                                ]
                              }
                            ]
                          },
                          "effectiveFrom": {
                            "type": "string",
                            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
                          },
                          "effectiveTo": {
                            "type": "string",
                            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
                          },
                          "publishedAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "resolutionNumber": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "sourceUrl": {
                            "type": "string",
                            "format": "uri"
                          }
                        },
                        "additionalProperties": false
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message",
                        "requestId",
                        "retryable"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "requestId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "retryable": {
                          "type": "boolean"
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message",
                        "requestId",
                        "retryable"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "requestId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "retryable": {
                          "type": "boolean"
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message",
                        "requestId",
                        "retryable"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "requestId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "retryable": {
                          "type": "boolean"
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "/"
    }
  ],
  "security": [],
  "tags": [
    {
      "description": "Qualified Dominican fuel products, applicable prices, and history.",
      "name": "Fuel prices"
    }
  ]
}