API Guidelines
  • adidas API Guidelines
  • General Guidelines
    • Introduction
    • API First
    • Contract
    • Immutability
    • Robustness
    • Common Data Types
    • Version Control System
    • Minimal API Surface
    • Rules for Extending
    • JSON
    • Security
    • Tooling
  • REST API Guidelines
    • Introduction
    • Core REST Principles
      • OpenAPI Specification
      • API Design Platform
      • Design Maturity
      • Testing
    • Protocol
      • HTTP
      • TLS
      • Separate Concerns
      • Request Methods
      • Status Codes
    • Message
      • Message Formats
      • Content Negotiation
      • HAL
      • Problem Detail
      • Foreign Key Relations
    • Application
      • Corporate Data Model
      • Common Data Types
    • Execution
      • Pagination
      • Long Running Tasks
        • Polling
        • Callback
        • Files Upload
      • Batch Operations
      • Search Requests
      • Query Requests with Large Inputs
      • Choosing Fields and Embedded Resources
      • Localization
      • Rate Limiting
      • Caching
      • Testing Enviroments
    • Evolution
      • Naming Conventions
      • Reserved Identifiers
      • URI Structure
      • Changes and Versioning
      • Phasing out Old Versions
    • Guides
      • API Testing CI Environment
      • Complete API Development
    • API Clients
      • Loose Coupling
    • Further References
  • Asynchronous API Guidelines
    • Introduction
    • Core Asynchronous Principles
      • Event Driven Architectures
      • Messages
        • Commands
        • Queries
        • Events
          • Events as Notifications
          • Events to Replicate Data
      • Protocols
      • Coupling
      • Bounded Context
      • Stream Processing
      • Naming Conventions
      • Tooling
        • Editors
        • Command Line Interface (CLI)
        • Generators
    • Kafka Asynchronous Guidelines
      • Introduction
        • Why AsyncAPI?
      • AsyncAPI Version
      • Internal vs Public Specifications
      • Key/Value Format
      • Message Headers
      • Specification Granularity
      • Self-Contained Specifications
        • Meaningful Descriptions
      • Schema Data Evolution
        • Backward Compatibility
        • Forward Compatibility
        • Full Compatibility
      • Automatic Schema Registration
      • Contact Information
      • AsyncAPI ID
      • Servers
      • Channels
      • Schemas
      • Security Schemes
      • External Docs
Powered by GitBook
On this page
  • Date and Time Format
  • Duration Format
  • Time Interval Format
  • Standard Time Stamps
  • Example
  • Language Code Format
  • Country Code Format
  • Currency Format
  1. REST API Guidelines
  2. Application

Common Data Types

PreviousCorporate Data ModelNextExecution

Last updated 6 years ago

Date and Time Format

Date and Time MUST always conform to the format e.g.: 2017-06-21T14:07:17Z (date time) or 2017-06-21 (date), it MUST use the UTC (without time offsets).

Duration Format

Duration format MUST conform to the standard e.g.: P3Y6M4DT12H30M5S (three years, six months, four days, twelve hours, thirty minutes, and five seconds).

Time Interval Format

Time Interval format MUST conform to the standard e.g.: 2007-03-01T13:00:00Z/2008-05-11T15:30:00Z.

Standard Time Stamps

Where applicable, a resource representation SHOULD contain the standard timestamps:

  • createdAt

  • updatedAt

  • finishedAt

Example

{
    "createdAt": "2017-01-01T12:00:00Z",
    "updatedAt": "2017-01-01T13:00:00Z",

    ...
}

Language Code Format

Country Code Format

Currency Format

Language codes MUST conform to the e.g.: en for English.

Country codes MUST conform to the e.g.: DE for Germany.

Currency codes MUST conform to the e.g.: EUR for Euro.

ISO 8601
ISO 8601
ISO 8601
ISO 639
ISO 3166-1 alpha-2
ISO 4217