openapi: 3.2.0 info: title: Open Food Facts open-prices REST Users API version: 0.0.0 (api) description: Open Prices API allows you to add product prices contact: name: The Open Food Facts team url: https://world.openfoodfacts.org email: contact@openfoodfacts.org license: name: ' AGPL-3.0' url: https://www.gnu.org/licenses/agpl-3.0.en.html tags: - name: Users paths: /api/v1/users: get: operationId: users_list parameters: - name: order_by required: false in: query description: Which field to use when ordering the results. schema: type: string - name: page required: false in: query description: A page number within the paginated result set. schema: type: integer - in: query name: price_count schema: type: integer - in: query name: price_count__gte schema: type: integer - in: query name: price_count__lte schema: type: integer - name: size required: false in: query description: Number of results to return per page. schema: type: integer tags: - Users responses: '200': content: application/json: schema: $ref: '#/components/schemas/PaginatedUserList' description: '' summary: Users list x-summary-source: derived /api/v1/users/{user_id}: get: operationId: users_retrieve parameters: - in: path name: user_id schema: type: string description: A unique value identifying this User. required: true tags: - Users responses: '200': content: application/json: schema: $ref: '#/components/schemas/User' description: '' summary: Users retrieve x-summary-source: derived /api/v1/users/{user_id}/badges: get: operationId: users_badges_list parameters: - name: page required: false in: query description: A page number within the paginated result set. schema: type: integer - name: size required: false in: query description: Number of results to return per page. schema: type: integer - in: path name: user_id schema: type: string description: A unique value identifying this User. required: true tags: - Users responses: '200': content: application/json: schema: $ref: '#/components/schemas/PaginatedUserBadgeList' description: '' summary: Users badges list x-summary-source: derived components: schemas: User: type: object properties: user_id: type: string price_count: type: integer maximum: 2147483647 minimum: 0 price_type_product_count: type: integer maximum: 2147483647 minimum: 0 price_type_category_count: type: integer maximum: 2147483647 minimum: 0 price_kind_community_count: type: integer maximum: 2147483647 minimum: 0 price_kind_consumption_count: type: integer maximum: 2147483647 minimum: 0 price_in_proof_owned_count: type: integer maximum: 2147483647 minimum: 0 price_in_proof_not_owned_count: type: integer maximum: 2147483647 minimum: 0 price_not_owned_in_proof_owned_count: type: integer maximum: 2147483647 minimum: 0 proof_count: type: integer maximum: 2147483647 minimum: 0 proof_type_price_tag_count: type: integer maximum: 2147483647 minimum: 0 proof_type_receipt_count: type: integer maximum: 2147483647 minimum: 0 proof_type_gdpr_request_count: type: integer maximum: 2147483647 minimum: 0 proof_type_shop_import_count: type: integer maximum: 2147483647 minimum: 0 proof_kind_community_count: type: integer maximum: 2147483647 minimum: 0 proof_kind_consumption_count: type: integer maximum: 2147483647 minimum: 0 location_count: type: integer maximum: 2147483647 minimum: 0 location_type_osm_city_count: type: integer maximum: 2147483647 minimum: 0 location_type_osm_country_count: type: integer maximum: 2147483647 minimum: 0 product_count: type: integer maximum: 2147483647 minimum: 0 badge_count: type: integer maximum: 2147483647 minimum: 0 currency_count: type: integer maximum: 2147483647 minimum: 0 year_count: type: integer maximum: 2147483647 minimum: 0 challenge_count: type: integer maximum: 2147483647 minimum: 0 required: - user_id PaginatedUserBadgeList: type: object required: - items - page - pages - size - total properties: items: type: array items: $ref: '#/components/schemas/UserBadge' page: type: integer description: Current page number example: 1 pages: type: integer description: Total number of pages example: 16 size: type: integer description: Number of items per page example: 100 total: type: integer description: Total number of items example: 1531 MetricEnum: enum: - price_count - price_in_proof_not_owned_count - proof_count - proof_type_price_tag_count - proof_type_receipt_count - proof_type_gdpr_request_count - proof_type_shop_import_count - location_count - location_type_osm_city_count - location_type_osm_country_count - currency_count - year_count - challenge_count type: string description: '* `price_count` - price_count * `price_in_proof_not_owned_count` - price_in_proof_not_owned_count * `proof_count` - proof_count * `proof_type_price_tag_count` - proof_type_price_tag_count * `proof_type_receipt_count` - proof_type_receipt_count * `proof_type_gdpr_request_count` - proof_type_gdpr_request_count * `proof_type_shop_import_count` - proof_type_shop_import_count * `location_count` - location_count * `location_type_osm_city_count` - location_type_osm_city_count * `location_type_osm_country_count` - location_type_osm_country_count * `currency_count` - currency_count * `year_count` - year_count * `challenge_count` - challenge_count' PaginatedUserList: type: object required: - items - page - pages - size - total properties: items: type: array items: $ref: '#/components/schemas/User' page: type: integer description: Current page number example: 1 pages: type: integer description: Total number of pages example: 16 size: type: integer description: Number of items per page example: 100 total: type: integer description: Total number of items example: 1531 Badge: type: object properties: id: type: integer readOnly: true name: type: string maxLength: 100 description: type: - string - 'null' image_url: type: - string - 'null' format: uri maxLength: 200 metric: $ref: '#/components/schemas/MetricEnum' threshold: type: integer maximum: 2147483647 minimum: 0 user_count: type: integer maximum: 2147483647 minimum: 0 created: type: string format: date-time updated: type: string format: date-time readOnly: true required: - id - metric - name - threshold - updated UserBadge: type: object properties: id: type: integer readOnly: true badge: allOf: - $ref: '#/components/schemas/Badge' readOnly: true achieved_at: type: string format: date-time user: type: string required: - badge - id - user securitySchemes: CustomAuthentication: type: http scheme: bearer