Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add created_at and updated_at to all relevant REST API resources #804

Merged
merged 1 commit into from Jan 16, 2020

Conversation

mattdavenport
Copy link
Contributor

When developing an integration with the Magento 1.9 REST API, I came across an issue in accessing fields created_at and updated_at for certain resources. Orders by default have created_at available, but not updated_at which is useful for incremental syncing. In addition, other resources such as /products and /stockitems have neither created_at or updated_at fields available to the consumer.

These dates are valuable for applications consuming the API, and should be available as attributes which can be enabled for applicable roles (Admin, Customer). In addition, these values should never be writable, and should only be included in the configuration for resources which have these dates in the database.

This PR adds both created_at and updated_at fields to all applicable resources, while excluding them from writes via configuration files.

@mattdavenport
Copy link
Contributor Author

Could we get this merged in? We'd like to start tracking magento-lts master soon and having this PR merged would be of great help. It appears it has enough reviews, so if there is any other issue please let me know and I'll push a fix. Thanks!

@kkrieger85
Copy link
Contributor

Ping @Flyingmana

@Flyingmana Flyingmana merged commit 9a18e17 into OpenMage:1.9.4.x Jan 16, 2020
@sreichel sreichel added Component: Catalog Relates to Mage_Catalog Component: CatalogInventory Relates to Mage_CatalogInventory Component: Customer Relates to Mage_Customer Component: Sales Relates to Mage_Sales labels Jun 11, 2020
@sreichel sreichel added this to the Release 19.4.1 milestone Jun 27, 2020
edannenberg pushed a commit to edannenberg/magento-lts that referenced this pull request Aug 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Catalog Relates to Mage_Catalog Component: CatalogInventory Relates to Mage_CatalogInventory Component: Customer Relates to Mage_Customer Component: Sales Relates to Mage_Sales enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants